Skip to main content
Back to Blog

WooCommerce Performance: Fix a Slow Store

23 February 2026·PageDiag·7 min read

WooCommerce powers over 35% of all online stores, but it has a reputation for being slow. That reputation is deserved - but only for stores that haven't been properly configured. A well-optimised WooCommerce site can load in under 2 seconds. The problem is that most aren't.

The typical slow WooCommerce store has the same handful of issues: cheap hosting, too many plugins, no caching, an unoptimised database, and oversized images. Fix these and your store will be dramatically faster.

Start by benchmarking. Run your store through PageDiag to get baseline Core Web Vitals and ecommerce-specific performance metrics.

1. Hosting: The Foundation

WooCommerce is a PHP application backed by a MySQL database. Both are resource-intensive. Running WooCommerce on a £3/month shared hosting plan is like running a shop from a garden shed - it technically works, but it won't scale.

What to look for

  • Server-level caching (Varnish, Redis, or LiteSpeed)
  • PHP workers - at least 4 for a store with moderate traffic
  • SSD storage - spinning disks are too slow for database queries
  • Server location - close to your primary customer base

Recommended hosting tiers

| Monthly traffic | Hosting type | Budget | |---|---|---| | Under 10K visits | Managed WordPress (Cloudways, GridPane) | £15-30/month | | 10K-100K visits | Managed WooCommerce (Starter tier) | £30-80/month | | 100K+ visits | Dedicated/VPS with managed stack | £80-200/month |

Avoid generic shared hosting (GoDaddy, Bluehost basic plans) for any store doing real revenue. The performance difference is night and day.

Quick test

Check your Time to First Byte (TTFB). Open your browser dev tools, load your homepage, and look at the "Waiting" time for the initial document request. If it's over 600ms, your hosting is likely the bottleneck.

2. Caching

Without caching, every page visit triggers PHP execution and database queries. With caching, the server returns a pre-built HTML file in milliseconds.

Page caching

Install a caching plugin. The best options:

  • LiteSpeed Cache - if your host runs LiteSpeed/OpenLiteSpeed (free)
  • WP Super Cache - simple, reliable, free
  • WP Rocket - paid (£49/year) but the most complete solution

Configuration for WP Super Cache:

// wp-config.php - enable caching
define('WP_CACHE', true);

Then in the plugin settings, enable "Expert" caching mode and set cache expiry to 3600 seconds (1 hour) for product pages. Exclude cart, checkout, and account pages from caching - these must be dynamic.

Object caching with Redis

Object caching stores database query results in memory, dramatically speeding up uncacheable pages (cart, checkout, admin):

# Install Redis on Ubuntu/Debian
sudo apt install redis-server
sudo systemctl enable redis-server

# Install Redis PHP extension
sudo apt install php8.3-redis

Then install the Redis Object Cache plugin and click "Enable Object Cache" in the settings. Verify it's working:

// Add to a test file to verify Redis connection
<?php
$redis = new Redis();
$redis->connect('127.0.0.1', 6379);
echo $redis->ping(); // Should output "+PONG"

Browser caching

Set appropriate cache headers for static assets. Add to your .htaccess or nginx config:

# Nginx - cache static assets for 1 year
location ~* \.(css|js|jpg|jpeg|png|gif|webp|woff2|svg)$ {
    expires 1y;
    add_header Cache-Control "public, immutable";
}

3. Plugin Audit

The average WooCommerce store has 30-50 plugins. Many are unnecessary, redundant, or poorly coded. Each active plugin adds PHP execution time and potentially database queries on every page load.

How to audit

  1. List all plugins and categorise: essential, nice-to-have, unknown
  2. Deactivate "nice-to-have" plugins one at a time and test site speed after each
  3. Remove unknown plugins - if you don't know what it does, you don't need it
  4. Check for overlap - do you have three SEO plugins? Two security plugins? Consolidate

Common culprits

  • Broken link checkers - run as a cron job or external service, not a live plugin
  • Post revision plugins - use wp-config.php instead: define('WP_POST_REVISIONS', 5);
  • Social sharing plugins that load JavaScript on every page
  • WooCommerce add-ons you installed once and forgot

Performance testing plugins

Use Query Monitor (free) to see exactly how many database queries each page generates and which plugin is responsible:

Dashboard → Queries → Queries by Component

If a single plugin is generating 50+ queries per page load, it needs to go or be replaced.

4. Database Optimisation

WooCommerce databases bloat over time. Transients, post revisions, spam comments, expired sessions, and orphaned metadata accumulate and slow down queries.

Clean up with WP-CLI

# Delete all post revisions
wp post delete $(wp post list --post_type='revision' --format=ids) --force

# Delete expired transients
wp transient delete --expired

# Delete spam and trashed comments
wp comment delete $(wp comment list --status=spam --format=ids) --force
wp comment delete $(wp comment list --status=trash --format=ids) --force

# Optimise all database tables
wp db optimize

Limit revisions going forward

Add to wp-config.php:

define('WP_POST_REVISIONS', 5);
define('AUTOSAVE_INTERVAL', 120); // seconds

Clean WooCommerce sessions

WooCommerce stores session data in the database. Old sessions accumulate:

-- Check session table size
SELECT COUNT(*) FROM wp_woocommerce_sessions;

-- Delete expired sessions (WooCommerce should do this automatically, but often doesn't)
DELETE FROM wp_woocommerce_sessions WHERE session_expiry < UNIX_TIMESTAMP();

Add database indexes

WooCommerce's wp_postmeta table often lacks useful indexes for common queries:

-- Add index for meta lookups (significant speed improvement for large stores)
ALTER TABLE wp_postmeta ADD INDEX meta_value_index (meta_value(50));

Warning: Test this on a staging site first. On very large databases (1M+ rows), the ALTER TABLE operation itself can take time.

5. Image Compression

Images are typically 60-80% of a WooCommerce page's total weight. Most product images are uploaded at full camera resolution and served uncompressed.

Automated compression

Install ShortPixel or Imagify to compress existing and future uploads automatically. Target settings:

  • Lossy compression for product images (visually imperceptible, 60-80% size reduction)
  • WebP conversion enabled
  • Maximum width: 2000px (sufficient for zoom functionality)

Serve WebP with fallback

Add WebP support via your .htaccess:

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteCond %{HTTP_ACCEPT} image/webp
  RewriteCond %{REQUEST_FILENAME} (.*)\.(jpe?g|png)$
  RewriteCond %{REQUEST_FILENAME}.webp -f
  RewriteRule (.+)\.(jpe?g|png)$ %{REQUEST_FILENAME}.webp [T=image/webp,E=REQUEST_image]
</IfModule>

Lazy loading

WordPress 5.5+ includes native lazy loading, but verify it's working:

// functions.php - ensure lazy loading is enabled (default in WP 5.5+)
add_filter('wp_lazy_loading_enabled', '__return_true');

Exclude above-the-fold images (hero banners, first product image) from lazy loading using fetchpriority="high".

6. CDN Setup

A Content Delivery Network caches your static files (images, CSS, JavaScript) on servers worldwide, so customers get them from a nearby location instead of your origin server.

Free option: Cloudflare

  1. Sign up at cloudflare.com (free plan works)
  2. Point your domain's nameservers to Cloudflare
  3. Enable "Auto Minify" for CSS and JavaScript
  4. Enable Brotli compression
  5. Set "Browser Cache TTL" to 1 year for static assets

Cloudflare Page Rules for WooCommerce

# Cache everything except dynamic pages
URL: yourstore.com/*
Setting: Cache Level → Cache Everything

# Bypass cache for cart, checkout, account
URL: yourstore.com/cart/*
Setting: Cache Level → Bypass

URL: yourstore.com/checkout/*
Setting: Cache Level → Bypass

URL: yourstore.com/my-account/*
Setting: Cache Level → Bypass

7. PHP Version

PHP 8.3 is roughly 40% faster than PHP 7.4 for WordPress workloads. Yet many hosting environments still default to older versions.

Check your current version

<?php phpinfo(); ?>

Or via WP-CLI:

wp eval 'echo phpversion();'

Upgrade process

  1. Check plugin compatibility - most modern plugins support PHP 8.2+
  2. Test on staging - update PHP on a staging site first
  3. Update - switch via your hosting control panel (cPanel, Plesk, or host-specific dashboard)
  4. Verify - check your error logs for deprecation warnings

The performance improvement from PHP 7.4 → 8.3 alone can reduce page generation time by 30-40%. It's the single highest-impact change you can make if you're running an old version.

Measure the Impact

After implementing these changes, measure your results. Run your store through PageDiag to compare your new scores against your baseline. PageDiag gives you ecommerce-specific insights beyond generic speed tests - including how your store performs for AI Shopping Score and LLM visibility.

Target metrics for a well-optimised WooCommerce store:

  • TTFB: Under 400ms
  • LCP: Under 2.5 seconds
  • FCP: Under 1.8 seconds
  • CLS: Under 0.1
  • Total page weight: Under 1.5 MB

Performance optimisation is iterative. Fix the biggest bottleneck first (usually hosting or caching), measure, then move to the next. Each change compounds. A store that was loading in 6 seconds can realistically reach 2 seconds by working through this list systematically.

Scan your store free at pagediag.com and start with whatever scores lowest.

Related Reading