WooCommerce optimization: what's really slowing your store down.
It's almost never the images. It's unused JavaScript, stacking database queries, and a checkout that drives your customers away. Here's how to fix it.
Core Web Vitals, explained.
Google measures three things on your site: display speed (LCP), visual stability (CLS), and click responsiveness (INP). These three metrics influence both your ranking AND your customers' experience.
Time until the main content is visible. Target: under 2.5 seconds. On a misconfigured WooCommerce, it's often 4 to 6 seconds on mobile.
Does the page "jump" during loading? Images without dimensions, late-loading fonts, banners that pop in — all of this drives visitors away. Target: 0.
When a visitor clicks "Add to cart", how long until something happens? Target: under 200ms. Heavy scripts block this responsiveness.
Cart fragments: the script that cripples every WooCommerce store.
wc-cart-fragments.js is loaded by WooCommerce on every page of your site. On every page load, it sends an AJAX request to admin-ajax.php to update the mini-cart icon. Even when the cart is empty. Even on your About page.
What it costs:
- One non-cacheable HTTP request per page view
- Server time wasted on nothing (PHP workers tied up)
- Artificially inflated TTFB
- On a 10,000 visits/month site: ~300,000 useless requests per month
The fix:
Disable cart fragments on non-cart pages. The cart updates only when needed (cart page, checkout page). The improvement is immediate and measurable.
add_action('wp_enqueue_scripts', function() { if ( !is_cart() && !is_checkout() ) { wp_dequeue_script('wc-cart-fragments'); } });
22 CSS files, 43 JavaScript files — on a single page.
That's what you find on a typical WooCommerce. Every plugin adds its own files, often on every page, even when they're not needed. A homepage slider loads its JS on the product page. The contact form loads its CSS on the checkout.
The usual suspects:
- Page builders (Elementor, Divi): 200-400 KB of CSS/JS on every page
- Social media plugins: external scripts that block rendering
- Google Fonts: each font family = a render-blocking request
- WooCommerce itself: CSS and JS loaded everywhere, including non-shop pages
The fix:
Identify what loads on each page and remove what's not needed. Tool: Perfmatters with its Script Manager — it lets you disable CSS/JS per page, per content type, per device. Surgical precision.
Your database is silently growing.
WordPress stores everything in wp_options, wp_postmeta, and wp_posts. Over time, it piles up: post revisions, expired transients, options from uninstalled plugins, and especially autoloaded options — loaded on every request, even when they're no longer used.
The symptoms:
- TTFB gradually increasing over months
- WooCommerce back-office getting slower and slower
- Product search queries timing out
What I check:
- Autoloaded options weight (often > 1 MB on an old site)
- Slow queries via MySQL Slow Query Log
-
Index state on
wp_postmeta(the most queried table) - Expired transients piling up
Tools:
Identify slow queries and the responsible plugin
Clean up autoloaded options
wp db query to analyze the database directly
Caching doesn't fix everything — but configured right, it changes everything.
Three cache layers to set up, in order:
Object Cache (Redis)
The most impactful for WooCommerce. Redis stores database query results in memory. Instead of recalculating the same data on every page view, WordPress retrieves them instantly. Tool: Object Cache Pro + Redis.
Page Cache
Stores the complete HTML page to serve it without running PHP. Effective for static pages (home, categories), but watch out for dynamic pages (cart, checkout, customer account) that must not be cached. Tool: WP Rocket or equivalent.
Edge Cache (CDN)
Cache is distributed on servers worldwide. Visitors get the page from the nearest server. Tool: Cloudflare APO — designed specifically for WordPress.
The classic trap:
Installing a cache plugin and calling it done. A misconfigured cache can serve an empty cart page to a customer who just added a product, or show a cached price when stock has changed.
The checkout is where you're losing money.
Average cart abandonment rate in e-commerce: 70% (Baymard Institute, 2024). Top reasons: process too long, mandatory account creation, not enough payment options.
Legacy checkout vs block checkout:
WooCommerce's classic checkout is a monolithic form that loads everything at once. The block checkout (introduced in WooCommerce 8.3) is modular, faster, and natively supports express payment buttons (Apple Pay, Google Pay).
Measured gains:
- Abandonment reduction: -20 to -35% (Baymard Institute)
- Checkout load time: cut in half on average
- Less CSS/JS loaded (block checkout only loads what it needs)
Is your hosting actually fast?
"I'm on a good host" isn't enough. What matters:
- TTFB without cache: if your TTFB exceeds 500ms without cache enabled, the problem is server-side
- PHP workers: how many simultaneous requests can your hosting handle? On shared hosting, it's often 2-4. A high-traffic WooCommerce needs 10-20
- PHP version: PHP 8.2+ minimum. Each major version brings 10-20% gains
- Redis available: without Redis, no performant Object Cache
- Configurable setup: can you adjust memory limits, timeouts, workers?
A €5/month hosting plan can work for a blog. For a WooCommerce that sells, you need hosting that understands e-commerce.
HPOS — High-Performance Order Storage.
Since WooCommerce 8.2, HPOS is available. Instead of storing orders in wp_posts and wp_postmeta (the same tables as blog posts), HPOS uses dedicated, optimized tables.
The result:
- Back-office 30 to 50% faster on order queries
- Instant order search, even with thousands of orders
- Lighter database (order data separated from content)
The problem:
Some plugins aren't HPOS-compatible yet. Migration requires checking every plugin, testing on staging, and switching cleanly.
Your store is affected by at least one of these issues.
Request a free audit — I'll tell you exactly what's slowing your site down and what it's costing you in sales.