WooCommerce slows down where caching can’t help: cart, checkout, the admin and the database.
If you want WooCommerce to stay fast with heavy traffic, a large catalog or a big order history, work on the parts a page cache never touches. Product and category pages can be cached. Everything below can’t.
Where It Slows Down
| Area | Why Caching Doesn’t Help | Usual Cause |
|---|---|---|
| Cart & checkout | Every request is unique to the customer. | Sessions table, slow plugin hooks, outside API calls |
| Admin | Never cached. | Order and product list queries, extra list columns |
| Database | Under everything. | Orders in wp_postmeta, sessions, scheduled action logs |
| Filtering & search | Too many combinations to cache. | Meta queries across the catalog |
HPOS Migration
High-Performance Order Storage moves orders out of wp_posts and wp_postmeta into their own indexed tables (wp_wc_orders, wp_wc_order_addresses, wp_wc_order_operational_data, wp_wc_orders_meta). It’s the default for new stores since WooCommerce 8.2. Older stores have to migrate, and it’s the biggest single improvement for a store with a large order history.
- Go to WooCommerce > Settings > Advanced > Features. It lists any active plugin that hasn’t declared HPOS support.
- Update or replace those plugins on a staging copy first.
- Turn on compatibility mode, which keeps both sets of tables in sync.
- Run the sync and verify it:
wp wc hpos sync
wp wc hpos verify_cot_data
wp wc hpos status
- Switch order storage to HPOS, with compatibility mode still on.
- Run for a week or two, then turn compatibility mode off. That’s when the write speed gain shows up.
What Breaks
- Code that reads orders with
get_post_meta( $order_id, ... )orupdate_post_meta(). WP_Queryorget_posts()withpost_type => 'shop_order'.- Direct SQL against
wp_postsandwp_postmetafor order data, common in custom reports and exports. - Admin customizations hooked to the old order edit screen.
The fix is to use the order API, which works with both storage types:
$order = wc_get_order( $order_id );
$value = $order->get_meta( '_my_field' );
$order->update_meta_data( '_my_field', 'value' );
$order->save();
$orders = wc_get_orders( array(
'status' => 'processing',
'limit' => 50,
) );
Safe Database Cleanup
| What | How | Notes |
|---|---|---|
| Customer sessions | WooCommerce > Status > Tools > Clear customer sessions | Empties active carts. Run it off peak. |
| Expired transients | wp transient delete --expired |
Always safe. |
| Scheduled action logs | Lower the retention period (30 days by default) | Completed actions pile up fast on busy stores. |
| Product lookup tables | Tools > Regenerate the product lookup tables | Regenerate. Don’t delete. |
add_filter( 'action_scheduler_retention_period', function () {
return 7 * DAY_IN_SECONDS;
} );
What I don’t touch without a backup and a staging test: deleting orders with SQL, “orphaned” postmeta, and anything a cleanup plugin offers to remove in bulk. Order data is spread across several tables and a partial delete causes more problems than it solves.
Checkout Timeouts Under Load
Checkout fails under load when uncached requests use up every PHP worker. Each slow checkout holds a worker, the queue grows, and requests time out.
- Outside API calls during checkout. Live shipping rates, tax lookups, fraud checks and CRM syncs all run while the customer waits. Give each a short timeout, and move anything that doesn’t have to finish before the order is placed into a background action.
- Bots creating carts. Crawlers hitting
?add-to-cart=links create a session each time and skip the cache. Block or rate limit those URLs at the edge. - No object cache. Redis or Memcached takes repeated option, session and product lookups off the database.
- Too few PHP workers for the number of uncached requests at peak.
- Order emails and webhooks sent inline. Defer them.
I go through the session side in WooCommerce cart session performance, and the edge setup in Cloudflare caching for WordPress.
Slow Admin With 8,000 Products
Install Query Monitor and load the slow screen. The cause is nearly always visible in the query list.
- Extra list columns. Plugins add columns to the product and order lists, and each one can run a query per row. Hide them in Screen Options, or remove the plugin’s column.
- Rows per page. Set Screen Options back to 20. Someone usually raised it to 200.
- Stale lookup tables. Sorting and filtering by price, stock or SKU uses
wp_wc_product_meta_lookup. Regenerate it if it’s out of date. - Orders still in postmeta. The order list and order search are far faster on HPOS.
- Dashboard widgets & analytics. Turn off the ones nobody reads.
- Autoloaded options. Old plugins leave large autoloaded rows that load on every request.
wp db query "SELECT option_name, LENGTH(option_value) AS size FROM wp_options WHERE autoload IN ('yes','on','auto','auto-on') ORDER BY size DESC LIMIT 20"