WooCommerce

Slow WooCommerce Store: 8 Million Rows, One Essential Check

Slow stores are often blamed on hosting, but the cause can be data nobody is looking after. Here is how one store’s database grew until a page crashed, and how to check yours.

Stack of database tables with one oversized table beside a loading store page, illustrating a slow WooCommerce store

The short version

  • A slow store is often a data problem, not a hosting problem.
  • A page should never change data while it loads.
  • Deleting rows may not give back the space until the table is rebuilt.

A slow WooCommerce store is often a store with too much data piling up behind the scenes. Every order adds records, and some plugins add far more records than you would expect. A slow WooCommerce store rarely happens overnight; it builds quietly until a page finally fails. This article walks through a real case where one table grew to about 8 million rows and crashed a customer page, what it taught us, and how to check your own store before it gets that far.

Why a slow WooCommerce store usually points to data, not hosting

When a store slows down, the first guess is usually the hosting plan. Sometimes that is right. More often a slow WooCommerce store is carrying years of order data, extra records created by plugins and leftovers nobody cleaned up.

Every order creates more than one record. There is the order itself, the items in it, the customer details, notes, payment information and often a record that says the customer may download a file. A busy store can hold many times more rows in its database than it has orders. That is normal. It becomes a problem when the records pile up faster than the store needs them, or when something creates the same record again and again.

The database is the store’s memory. Pages that ask it a lot of questions, such as a customer’s account page or the admin order list, have to search through every row. The bigger and messier the tables, the longer each search takes, until pages slow down or fail. That is how a healthy store becomes a slow WooCommerce store without any single change to blame.

A real case: 8 million rows and a crashed account page

One store we worked on sold downloadable products. Customers who opened their downloads page started seeing a fatal error instead of their files.

Here is what we found underneath:

  • A single table that records which customers may download which files had grown to about 8 million rows.
  • Roughly 3.3 million of those rows were exact duplicates of other rows.
  • A cleanup step was set to delete rows at the moment a customer loaded the page, so the page was deleting records while it was also reading them.
  • Another process kept regenerating the records for whole orders instead of only the missing ones, which created the duplicates in the first place.

The page loaded the table, the table was being changed at the same moment, and the result was a crash. This is a slow WooCommerce store problem in its most extreme form, and it never showed up as a gentle slowdown first. The data had grown large enough, and messy enough, that an ordinary page could no longer finish.

How we fixed the slow WooCommerce store and what we did

We treated it as a data problem first and a code problem second. The notable steps were:

  • Removed the delete step from the customer’s page load, so a page can never change the data it is reading.
  • Replaced the blanket delete with a careful process that only removes true duplicates and only adds records that are missing.
  • Built a cleanup command with a dry-run mode that shows exactly what would change before anything is touched, and with limits on how much it processes at once.
  • Deployed the cleanup through a gated runbook, one controlled step at a time.
  • Checked the result afterward. About 4.78 million rows remained, with zero duplicates.

What makes a slow WooCommerce store get worse over time

Three habits turn a manageable store into a slow WooCommerce store.

The first is storing everything forever. Old orders, expired sessions, logs and temporary records add up, and nothing removes them unless someone sets that up.

The second is plugins that add their own rows to every order. Each plugin may be sensible on its own, but ten of them can multiply the data attached to each sale.

The third is cleanup that runs at the wrong moment. A job that deletes data during a page load, or a regenerator that rebuilds everything each time, can make the problem larger instead of smaller.

Warning signs of a slow WooCommerce store

You will rarely see a clear error until it is severe. These signs appear first:

  • Customer account pages, order history or downloads load slowly or sometimes fail.
  • The orders screen in your admin takes noticeably longer than it used to.
  • Your database or backups keep growing much faster than your sales.
  • Your host warns about storage or database size.
  • Slowness gets worse as the month goes on and eases after a restart or cache clear.

If two or more of these apply, look at the size of your database tables before you pay for a bigger hosting plan.

What we learned about a slow WooCommerce store

Three lessons came out of this case, and they apply to any store.

First, data that grows with every order needs an owner. Someone has to decide how long records are kept, and what removes the rest.

Second, a page should never change data while it is loading. Cleanup belongs in a scheduled job that runs on its own, away from customers.

Third, deleting rows does not always give back the space. On another store, deleting old order rows freed nothing until the table was rebuilt, and the rebuild recovered 299 MB in about two seconds. Many owners clean up, see no change and assume it did not work.

WooCommerce also offers a newer way to store orders. Its documentation describes High-Performance Order Storage (opens in a new tab) as an option that keeps orders in their own dedicated tables, designed to help stores stay fast as they grow. It is worth asking your developer whether it suits your store, but it does not replace regular cleanup.

What we would do differently

Looking back, a few habits would have kept this from becoming a slow WooCommerce store in the first place, and would have caught the problem long before a customer saw an error:

  • Check the size of the largest database tables once a month, and note any that grow faster than your orders.
  • Review what each plugin stores for every order before you install it.
  • Run any cleanup on a copy of the store first, using a dry run to see what will change.
  • Schedule cleanup jobs outside peak hours instead of attaching them to page loads.

None of these steps is difficult. They only need to be on someone’s list, and a monthly reminder is enough to keep a slow WooCommerce store from sneaking up on you.

How to check your store for a slow WooCommerce store problem

You do not need to write code to look for trouble. Try this:

  1. Ask your host or developer for a list of your ten largest database tables and their row counts. Many hosting panels show this directly.
  2. Compare the biggest tables with your real order count. A table with millions of rows on a store with a few thousand orders deserves a question.
  3. Look at which plugin each large table belongs to. The name of the table usually points to it.
  4. Time your customer account page and your admin orders screen on a quiet day, and note the numbers so you can compare them later.
  5. Take a full backup before any cleanup, and test the cleanup on a copy of the store first.

If one table stands out, do not delete rows by hand. A slow WooCommerce store is rarely fixed by a single quick delete. Ask a developer to confirm what the table is for and which rows are safe to remove.

What to do if you already have a slow WooCommerce store

If you suspect data is the cause, work in this order. Take a backup and confirm it can be restored. Find the largest tables and what created them. Stop the source of new rows, such as a plugin setting or a scheduled job, before you clean anything up, otherwise the table refills. Clean in small batches on a copy first, then on the live store. After the cleanup, rebuild the table if your host’s tools allow it so the space is returned, and measure the same pages again so you can see the difference.

Questions store owners ask

Will a faster hosting plan fix a slow WooCommerce store?

Sometimes it helps, but it does not remove the cause. A bigger plan can hide a data problem for a while and make it more expensive.

Is it safe to delete old orders?

Not without a plan. Orders can be needed for taxes, refunds and customer history. Archive or export first, then delete only what you are sure you no longer need.

How many rows is too many?

There is no single number. What matters is whether a table is much larger than the orders it supports, and whether pages that depend on it are slowing down.

Does a small store need to worry about a slow WooCommerce store?

Yes. A plugin that creates duplicates can build millions of rows even on a store with a modest number of sales.

Want a second pair of eyes on your store?

If you are not sure whether you have a slow WooCommerce store or just a busy one, our free site check-up looks at it from the outside and tells you what it finds. You can also see how we build stores that stay fast as they grow through our Build and Care services.

Keep reading

More articles.

All articles

Start with a free site check-up.

Request a free site check-up
  • Free, no obligation
  • Report in 3 business days
  • Nothing on your site is changed