How to speed up a WooCommerce store
This page explains why a WooCommerce store is slow, lists urgent technical fixes, details the cart fragments issue, and provides a deployable checklist and…

Direct answer : this page explains why a WooCommerce store is slow, lists urgent technical fixes to apply first, details the cart fragments issue, and gives a deployable checklist and tests to measure impact.
Why WooCommerce can be slow
WooCommerce is a dynamic application that mixes public pages with per‑session state. Product and category pages are public. Cart, Checkout and My Account depend on session data and user state. That mix forces more server work than a static site.
Common root causes recur across guides and troubleshooting notes: insufficient hosting resources, heavy or poorly coded plugins and themes, unoptimized images and front assets, cart fragments and AJAX calls that break caching, absence of a persistent object cache, and many third‑party requests. Each of these increases server CPU, database queries or client render time.
The cart fragments mechanism is specifically highlighted in WooCommerce documentation and developer posts. The script wc-cart-fragments.js triggers AJAX calls (wc-ajax=get_refreshed_fragments) to keep the mini‑cart current. If the theme loads a dynamic mini‑cart sitewide, those AJAX requests can prevent effective page caching and raise latency.
Hosting and architecture are also decisive. Official WooCommerce guidance points to PHP version, PHP‑FPM, disk type and overall scalability as determinants of how the stack handles load. For stores with heavy traffic or large catalogs, architecture and resource isolation become central.
Priorities to apply urgently — ordered checklist for a developer
Start with low-risk actions that unlock big wins. Apply changes on a staging environment when possible. Make a snapshot or backup before each major step.
1) Hosting and PHP stack. Verify you run a current PHP 8.x compatible setup and that PHP‑FPM is used. Confirm sufficient CPU/RAM and fast storage (NVMe) with the host. If traffic is expected to grow, discuss scaling options and isolation with the provider.
2) Persistent object cache. Enable Redis or Memcached to reduce repeated database queries. Install an object‑cache drop‑in or plugin compatible with the host and verify hits/misses after activation.
3) Page cache that is WooCommerce‑aware. Use a cache that excludes Cart/Checkout/My Account from full page cache. Configure automated purge on product or stock changes so cached product pages do not serve stale info.
4) Cart fragments. Detect wc-ajax=get_refreshed_fragments calls in network traces. If the mini‑cart is not needed sitewide, condition or disable the cart fragments script to avoid cache misses. Consider localStorage replacements where appropriate.
5) Images and front assets. Convert images to modern formats (WebP), enable responsive srcset and lazy‑loading, compress losslessly, and serve assets via CDN. Minify and defer noncritical CSS/JS.
6) Plugins and theme audit. Dequeue scripts not used on given templates. Remove redundant or abandoned plugins. Prefer a lighter theme or a performance‑oriented child theme.
7) Database maintenance. Clear expired transients, clean old revisions, and optimize indexes and tables. Purge WooCommerce transients that accumulate from coupons, shipping rates or large order histories.
8) CDN and edge caching. Push static assets to a CDN and consider edge caching for product pages where dynamic fragments are controlled.
9) Monitoring. Install APM or host monitoring to collect server response times and slow transactions, and schedule regular PageSpeed/Lighthouse checks.
Cart fragments: mechanism, why they slow you, and concrete options
Mechanism. Cart fragments update the mini‑cart via AJAX so the cart shown in the header reflects the current session. The script wc-cart-fragments.js fires wc-ajax=get_refreshed_fragments requests to the server.
Why it causes slowdowns. Those AJAX calls create cache misses and add server work on pages that would otherwise be fully cacheable. If loaded sitewide, they force dynamic behaviour where a static response would perform better.
Options to fix or mitigate.
Risks. Removing the dynamic mini‑cart can degrade UX for users who expect instant cart updates. Any change must be validated with functional tests on cart and checkout flows.
Object cache and database: why they matter and what to check
Object cache reduces repeated database hits by storing query results in memory. For dynamic stores, Redis or Memcached cut the load on MySQL by serving frequent lookups from RAM. The developer documentation and performance guides recommend enabling a persistent object cache for WooCommerce sites.
Key checks for object cache.
Database upkeep. Remove expired transients, compact tables and ensure indexes exist on high‑cardinality columns used by frequent queries. Use the WooCommerce System Status tools to identify transients specific to the shop.
Page caching: which pages to cache and how to handle dynamic pages
Cache public product and category pages aggressively. Exclude Cart, Checkout and My Account from standard page cache. When product data changes, trigger purge on affected URLs so customers see updated stock or price information.
Use fragment caching or ESI where available to cache stable parts of a page while fetching dynamic fragments separately. If ESI is not available, rely on careful script loading and localStorage-based fragments to keep the bulk of the page cacheable.
Watch for cookies such as woocommerce_items_in_cart that influence caching behavior. Configure the cache layer to ignore user‑independent cookies while respecting session cookies on checkout pages.
Front‑end optimizations: images, JS, CSS and third‑party requests
Convert images to WebP and provide responsive images via srcset. Enable lazy loading to delay offscreen images. Compress images without visual loss.
Defer or async noncritical JS. Extract critical CSS to speed initial render. Audit third‑party scripts (analytics, tag managers, payment widgets) and defer or conditionally load them to reduce blocking requests.
Run waterfall checks and Lighthouse audits to identify long render paths and blocking resources. Use those traces to prioritize which CSS/JS to defer and which third‑party calls to batch or remove.
Hosting and architecture recommendations by profile
Small store. A managed shared plan or an entry VPS with a CDN and the option to enable Redis can work for low traffic and moderate catalog sizes.
Growing store. Prefer a managed or VPS environment with PHP‑FPM, isolated DB, Redis object cache, and CDN with edge rules. Ensure automatic purge hooks for product updates.
Large/high traffic. Split services: separate database layer, read replicas, load balancers, and a cache layer. Move noncritical processes to asynchronous workers and queues to avoid blocking user requests.
Discuss architecture choices with the host and design for expected peak traffic rather than average traffic.
Measure the impact: tools and a testing methodology
Tools to use: Lighthouse / PageSpeed Insights, WebPageTest, GTmetrix. Monitor TTFB, server response times, Core Web Vitals (LCP, INP, CLS) and specific AJAX endpoints for cart fragments.
Methodology. Establish a baseline before changes. Apply a single change. Rerun identical tests and compare results. Record date and time of each test run. Repeat tests to observe variance and avoid over‑interpreting a single run.
Also track server metrics from an APM to find slow PHP transactions or heavy SQL queries that escape front‑end measurements.
Common pitfalls and things to avoid
Deployable checklist for a developer (short)
What could not be established from available sources
any quantified performance gains for specific plugins or hosts. No unsourced percentages or guarantees should be stated. No specific hosting plan names, exact prices, or claims that a single setting will resolve all issues are available. Live diagnostics on a given site are out of scope; this page provides methods and checks to run, not bespoke audits.
Sources
- [1]WooCommerce Developer — Performance best practices — developer.woocommerce.com — checked on September 27, 2026
- [2]WooCommerce Developer Blog — Best practices for the use of the cart fragments API — developer.woocommerce.com — checked on September 27, 2026
- [3]WooCommerce — Troubleshooting a slow site — woocommerce.com — checked on September 27, 2026
- [4]WooCommerce Blog — Ten Proven Ways to Speed Up Your Store — woocommerce.com — checked on September 27, 2026
- [5]WP Rocket — Using WP Rocket on your WooCommerce site — docs.wp-rocket.me — checked on September 27, 2026
- [6]WP Rocket — Optimize WooCommerce get refreshed fragments — docs.wp-rocket.me — checked on September 27, 2026
- [7]WordPress Developer — PHP Optimization (performance) — developer.wordpress.org — checked on September 27, 2026
- [8]WooCommerce — Scaling FAQs — woocommerce.com — checked on September 27, 2026
- [9]WordPressOptimization — WooCommerce performance optimization (cart fragments, cache) — wordpressoptimization.com — checked on September 27, 2026
- [10]State of Digital Publishing — Performance Guide (Redis recommendation) — stateofdigitalpublishing.com — checked on September 27, 2026
Related guides
Emma Collins
Emma covers e-commerce, website builders, design and AI tools. She compares platforms on the criteria a small business actually feels: setup time, running costs and lock-in.
Updated on September 27, 2026