In short
WooCommerce usually slows down as your product count grows for four reasons: the cart fragments request running on every page, bloated autoload data in the wp_options table, unnecessary plugin load and growing database tables. Find slow queries with Query Monitor, shrink autoload, clean up Action Scheduler and expired transients, and enable HPOS; if you still hit the CPU limit after optimizing, upgrade your plan.
In this guide
- Step 1: Measure where the slowdown is
- Step 2: Get cart fragments under control
- Step 3: Clean up autoload bloat
- Step 4: Reduce plugin load
- Step 5: Prepare your database for growth
- Step 6: Tune caching for WooCommerce
- Step 7: Lighten category and product pages
- When do you need to upgrade resources?
- Next step: optimize first, then grow with the right resources
When WooCommerce slows down, the problem is rarely in just one place. As your product count grows from a few hundred to thousands, four things grow together: the cart fragments request, autoload data, plugin load and database tables. The right approach is to measure first instead of guessing, then fix things starting with the biggest bottleneck. When you apply the steps in this guide in order, most stores get noticeably faster without changing plans; at the end, we also explain when upgrading resources becomes necessary.
Before you start, take a full backup of your database and files. The SQL and code examples below modify data.
Step 1: Measure where the slowdown is
First, identify the type of slowdown. Product and category pages are fast if they're served from cache; the problem is usually on pages that can't be cached: cart, checkout, search, filters and the admin dashboard.
- Install the Query Monitor plugin. Open the slow page as an admin and, from the panel in the top toolbar, review the total query count, slow queries and components (plugins) ranked by query time.
- Open the Network tab in your browser's developer tools and check how long the
wc-ajaxrequests take. - On the cPanel resource usage screen, check how often you hit the CPU and entry process limits.
- On the WooCommerce > Status screen, note the WordPress memory limit, PHP version and database table sizes.
Step 2: Get cart fragments under control
Cart fragments is the AJAX request sent to ?wc-ajax=get_refreshed_fragments to keep the mini cart in the menu up to date, even when the page itself comes from cache. This request can't be cached and runs PHP on every visit. In newer WooCommerce versions, the script loads only on pages that use the mini cart, but many themes still add it to every page.
If you see this request on every page in the Network tab, you can disable the script on pages that don't need the mini cart. Add the code to your child theme's functions.php file or to a code snippets plugin:
add_action( 'wp_enqueue_scripts', function () {
if ( function_exists( 'is_woocommerce' ) && ( is_cart() || is_checkout() ) ) {
return;
}
wp_dequeue_script( 'wc-cart-fragments' );
}, 20 );After this change, the cart counter in the header may show the old value until the page is refreshed. If the counter must update instantly, a better solution is to use LiteSpeed Cache's ESI (Edge Side Includes) feature to keep only the cart block out of the cache. For settings, see our guide to speeding up WordPress with LiteSpeed Cache.
Step 3: Clean up autoload bloat
Autoload refers to the settings in the wp_options table that are loaded into memory all at once on every page request. Settings left behind by deleted plugins and large cache entries bloat this data, and every request has to carry that weight. WordPress's Site Health screen warns you when autoload size goes over about 800 KB.
In phpMyAdmin's SQL tab, check the size and the largest entries (if your table prefix isn't wp_, use your own prefix):
-- Total autoload size (MB)
SELECT ROUND(SUM(LENGTH(option_value)) / 1024 / 1024, 2) AS autoload_mb
FROM wp_options
WHERE autoload IN ('yes', 'on', 'auto-on', 'auto');
-- Largest 20 entries
SELECT option_name, ROUND(LENGTH(option_value) / 1024, 1) AS kb
FROM wp_options
WHERE autoload IN ('yes', 'on', 'auto-on', 'auto')
ORDER BY LENGTH(option_value) DESC
LIMIT 20;If the list includes large entries starting with the name of a plugin you no longer use, they can be deleted. If an entry belongs to a plugin you still use, don't delete it; use the plugin's own cleanup setting instead. To clear expired transients, you can use WP-CLI:
wp transient delete --expired
wp option list --autoload=on --format=total_bytesStep 4: Reduce plugin load
Over time, stores end up with 40-50 plugins, and each one runs on every request. The "Queries by Component" table in Query Monitor shows which plugin uses the most queries and time.
- Consolidate plugins that do the same job (such as two separate SEO plugins or two separate security plugins).
- Load page builder modules only on the pages that use them.
- Move marketplace and XML product feed plugin syncs to overnight hours.
- Delay live chat, heatmaps and ad pixels until the first interaction.
Step 5: Prepare your database for growth
High-Performance Order Storage (HPOS)
In the legacy structure, orders are stored in the wp_posts and wp_postmeta tables, in the same place as products. HPOS moves orders into their own tables, speeding up both the orders screen and product queries. You can enable it under WooCommerce > Settings > Advanced > Features; first confirm on a staging copy that your plugins are compatible.
Shrink the Action Scheduler table
WooCommerce stores background tasks in the wp_actionscheduler_actions table and keeps completed entries for one month by default. On busy stores, this table can grow to hundreds of thousands of rows. Check its status:
SELECT status, COUNT(*) AS adet
FROM wp_actionscheduler_actions
GROUP BY status;To cut the retention period to one week, add this filter; old entries are deleted on the next cleanup runs:
add_filter( 'action_scheduler_retention_period', function () {
return WEEK_IN_SECONDS;
} );If you see many failed or pending entries, check which task is stuck on the WooCommerce > Status > Scheduled Actions screen. So that background tasks don't depend on visitor traffic, we recommend that you disable WP-Cron and set up a real cron job.
Check lookup tables and indexes
- The "Regenerate the product lookup tables" tool on the WooCommerce > Status > Tools screen updates the table used by price and stock filters; run it after bulk product imports.
- On large stores, the
wp_postmetatable can grow to millions of rows. Default WordPress indexes aren't designed for that scale; a plugin such as Index WP MySQL For Speed can add more efficient composite indexes once you've taken a backup. - Default WordPress search is slow on a large catalog; if you have more than a few thousand products, use a search plugin with indexed search.
Step 6: Tune caching for WooCommerce
Product and category pages should be served from the full-page cache, while cart, checkout and my-account pages stay out of it. LiteSpeed Cache handles this split for WooCommerce automatically. When stock or prices change, only the cache for the related product and category pages is purged; purging the entire cache frequently forces the site into a cold start again and again.
Step 7: Lighten category and product pages
Once the server side is fixed, lighten the pages themselves; category pages in particular get heavy on a large catalog.
- Products per page: Instead of listing 60-100 products on a category page, show 24-36 and use pagination; each product card means a separate image, price and stock calculation.
- Product images: Serve images in WebP format at the size your theme displays them. If you've changed themes, regenerate thumbnails; otherwise the browser has to shrink large original files to display them.
- Products with many variations: When a product has more than 30 variations, WooCommerce fetches the options via AJAX instead of embedding them in the page. Don't raise this threshold without good reason; loading hundreds of variations on a single page slows the product page down significantly.
- Related products and cross-sell blocks: A randomly sorted "related products" block runs a separate query on every request; limiting it to 4 items is enough.
When do you need to upgrade resources?
Optimization lets you do more with the same resources, but it has limits. If the following symptoms persist after the steps above, the bottleneck is now your server resources:
- The resource usage screen shows you regularly hitting the CPU limit, even outside campaigns.
- Visitors see the 508 Resource Limit Is Reached error during peak hours.
- Queries in Query Monitor are fast, but page generation time is high, meaning requests are waiting in line for CPU.
- Your product count has passed tens of thousands, and order and product lists in the admin dashboard are noticeably slow.
You can see which plan matches which store size on the e-commerce hosting plans page. For a large catalog with heavy traffic, the SA-ET-3 plan with 8 GB RAM, an 8-core processor and an 800% CPU limit gives uncached cart and checkout requests double the processor headroom. The plan's access and error logs let you see slow requests and errors at the source, and the 1,000 hourly email limit keeps notifications from getting stuck in a queue on busy order days.
Next step: optimize first, then grow with the right resources
Apply the steps in order: measure, limit cart fragments, clean up autoload and Action Scheduler, cut down plugins, and tackle HPOS and indexes. Re-measure the same pages after each step and note the gains. If your store still hits its resource limits after optimizing, compare Sunucu Atlas e-commerce hosting plans, or for a large catalog and heavy traffic, move straight to SA-ET-3; during a plan change or migration, you can open a support ticket for help.
Frequently asked questions
Why does WooCommerce get slower as my product count grows?
As your product count grows, the wp_postmeta table, search and filter queries, and background tasks all grow too. Add bloated autoload data and the cart fragments request running on every page, and pages that can't be cached slow down.
Is it safe to disable cart fragments?
As long as it stays enabled on the cart and checkout pages, it won't break the order flow. The only side effect is that the mini cart counter in the header won't update until the page is refreshed.
How big should autoload data be?
The WordPress Site Health screen warns above about 800 KB; on a healthy store, aim to stay below that. Before deleting large entries, always check which plugin they belong to.
Will enabling HPOS affect my existing orders?
WooCommerce migrates orders to the new tables by syncing them and can keep both structures in sync during the transition. Still, take a backup first and confirm your plugins' HPOS compatibility on a staging copy.
Should I optimize or upgrade my plan?
Optimize first; for most stores, the biggest gains come from fixing autoload, plugins and cart fragments. If you still regularly hit the CPU limit and 508 errors continue after that, you need to upgrade your plan.