WooCommerce Speed: How to Get Your Webshop Under 3 Seconds
WooCommerce powers over 36% of all webshops globally. It's flexible, open source, and enormously powerful. But it has one Achilles' heel: Speed.
A standard WooCommerce installation with 20 plugins, 500 products, and a typical theme loads in 4-7 seconds on mobile. That's not just annoying — it costs you money.
Every extra second of load time reduces conversion by 7%. A webshop that loads in 5 seconds potentially loses 21% of its sales compared to one that loads in 2 seconds.
This guide goes beyond the basic tips. Here we dive into the WooCommerce-specific techniques that make the real difference.
Prerequisites
This guide assumes you already have:
- A cache plugin (WP Rocket, LiteSpeed Cache)
- A CDN (Cloudflare, BunnyCDN)
- Decent hosting (not $5/mo shared hosting)
Missing the basics? Start with WordPress Speed Optimization: The Complete Guide.
Why WooCommerce is slow
Before we solve the problem, we need to understand it. WooCommerce is slow for three primary reasons:
1. Cart fragments (AJAX)
WooCommerce loads a JavaScript fragment on every page that checks if there are products in the cart. It's called wc-ajax=get_refreshed_fragments and runs an unauthenticated AJAX request that bypasses cache.
Effect: 200-800ms extra TTFB on every single page view — including pages that have nothing to do with the shop.
2. Database queries
A typical WooCommerce product page runs 100-300 database queries. With 500+ products and variations, a product archive page can easily hit 500+ queries.
3. Plugin overload
Most WooCommerce shops have 30-50 plugins. Many of them load scripts and styles on all pages — not just shop pages.
Technique 1: Tame cart fragments
Cart fragments are the single biggest performance killer in WooCommerce. Here are three approaches:
Disable completely (simple shops)
If your shop doesn't have a "cart indicator" in the header, you can disable cart fragments entirely:
add_action('wp_enqueue_scripts', function() { if (!is_cart() && !is_checkout()) { wp_dequeue_script('wc-cart-fragments'); }});Reduce frequency (middle ground)
Replace AJAX fragments with a lightweight alternative that only checks the cart on interaction:
add_action('wp_enqueue_scripts', function() { if (is_product() || is_shop() || is_product_category()) { return; // Keep on shop pages } wp_dequeue_script('wc-cart-fragments');});Use a lightweight alternative
Plugins like Mini Cart Drawer replace WooCommerce's heavy cart fragments with a lightweight implementation that only loads on click.
Measure the effect
Test your site in Chrome DevTools → Network. Filter for "wc-ajax". If you see get_refreshed_fragments on non-shop pages, you have the problem. Disabling typically saves 200-500ms.
Technique 2: HPOS (High-Performance Order Storage)
WooCommerce has historically stored orders in the wp_posts table — alongside blog posts, pages, and everything else. This is an architectural flaw that makes database queries slow.
HPOS (stable since WooCommerce 8.2) moves orders to dedicated tables:
| Factor | Classic (wp_posts) | HPOS (dedicated tables) |
|---|---|---|
| Order queries | 200-500ms | 20-50ms |
| Admin order list | 2-5s (10,000+ orders) | 0.5-1s |
| Checkout | 100-300ms extra | Minimal overhead |
| Reporting | Slow with many orders | 5-10x faster |
Enable HPOS
- Go to WooCommerce → Settings → Advanced → Features
- Enable High-Performance Order Storage
- Run synchronization of existing orders
- When sync is complete, disable legacy mode
Plugin compatibility
Not all plugins support HPOS yet. Check your plugin compatibility in WooCommerce → Status → HPOS Compatibility. The major players (Stripe, PayPal, Mailchimp) support it. Smaller niche plugins may lack support.
Technique 3: Product image pipeline
Product images are typically the heaviest element on a WooCommerce page. Here's the optimal pipeline:
Upload workflow
- Originals: Max 2400px wide, JPEG quality 85
- Auto-conversion: ShortPixel or Imagify converts to AVIF + WebP
- Lazy loading: WordPress 6.3+ has native lazy loading
- Srcset: WooCommerce automatically generates responsive variants
Thumbnail optimization
WooCommerce generates 6-8 image sizes per product. With 500 products, that's 3,000-4,000 files. Optimize:
// Reduce the number of image sizesadd_filter('intermediate_image_sizes_advanced', function($sizes) { unset($sizes['medium_large']); // 768px — rarely used unset($sizes['1536x1536']); // Rarely used unset($sizes['2048x2048']); // Rarely used return $sizes;});Technique 4: Database optimization
Transients and sessions
WooCommerce creates thousands of transients and sessions in the wp_options table. Over time, the table grows and becomes slow:
-- Check the size of wp_optionsSELECT COUNT(*) as total, SUM(CASE WHEN autoload = 'yes' THEN 1 ELSE 0 END) as autoloadedFROM wp_options;Product lookup tables
WooCommerce has lookup tables for price, rating, and stock that are cached. Regenerate them if out-of-sync:
- Go to WooCommerce → Status → Tools
- Click Regenerate product lookup tables
- Click Regenerate product attributes lookup table
Technique 5: Checkout optimization
The checkout page is the most important page in your webshop — and often the slowest.
WooCommerce Blocks Checkout
WooCommerce Blocks Checkout (introduced in WC 8.3+) is significantly faster than the classic shortcode checkout:
| Factor | Classic checkout | Blocks checkout |
|---|---|---|
| JavaScript | 300-500 KB | 100-200 KB |
| Payment gateway loading | Synchronous | Asynchronous |
| Validation | Server-side | Client-side + server |
| UX | Full page reload | SPA-like |
Reduce payment gateways
Each payment gateway loads its own JavaScript. 5 gateways = 5 scripts. Limit to 2-3 relevant ones.
Remove unnecessary fields
add_filter('woocommerce_checkout_fields', function($fields) { unset($fields['billing']['billing_company']); unset($fields['billing']['billing_address_2']); unset($fields['order']['order_comments']); return $fields;});Technique 6: Plugin audit for WooCommerce
Conditional loading
The most effective thing you can do — ensure plugins only load on pages where they're used:
add_action('wp_enqueue_scripts', function() { if (!is_woocommerce() && !is_cart() && !is_checkout() && !is_account_page()) { wp_dequeue_style('woocommerce-layout'); wp_dequeue_style('woocommerce-smallscreen'); wp_dequeue_style('woocommerce-general'); wp_dequeue_script('wc-add-to-cart'); wp_dequeue_script('woocommerce'); }});Technique 7: Object caching
WooCommerce is extremely database-heavy. Object caching stores query results in RAM instead of hitting the database again:
| Solution | Price | Speed | Complexity |
|---|---|---|---|
| Redis | Free-$20/mo | Fastest | Medium |
| Memcached | Free-$15/mo | Fast | Medium |
| APCu | Free | Fast (single server) | Low |
Redis is my recommendation. Most managed hosts (Kinsta, Cloudways, SpinupWP) offer Redis with one click.
Effect: 30-50% reduction in TTFB for WooCommerce pages.
The prioritized optimization plan
Disable cart fragments on non-shop pages
Single biggest effect. 200-500ms improvement with one code change.
Enable HPOS
Migrate to dedicated order tables. Huge difference at 1,000+ orders.
Optimize product images
AVIF/WebP with ShortPixel, remove unnecessary image sizes, lazy load galleries.
Install object caching (Redis)
30-50% faster database queries. Most hosts offer it.
Plugin audit with conditional loading
Remove or lazy-load plugins that load on all pages. Use Query Monitor to identify culprits.
Switch to Blocks Checkout
Faster and more modern checkout experience.
Database cleanup
Remove expired transients, regenerate lookup tables, audit autoloaded options.
Conclusion
WooCommerce isn't slow by nature — it's slow by habit. Most speed problems come from cart fragments, missing object caching, and plugins loading everywhere.
With the techniques I've described here, under 3 seconds is realistic for most WooCommerce shops. And for shops with good hosting and few plugins, under 2 seconds is achievable.
The key insight: Speed isn't a luxury problem for webshops — it's directly linked to revenue. Every millisecond counts.
Need a WooCommerce optimization?
I've optimized dozens of WooCommerce shops — from small niche stores to shops with 10,000+ products. Book a free consultation and let's look at your shop's speed.




