Skip to content

How to speed up your WooCommerce store (and stop losing sales to slow pages)

Matt 11 min read

A one-second delay in page load time can reduce conversions by up to 7%. For a WooCommerce store turning over $10,000 a month, that’s $700 gone — every month — from a problem most store owners don’t even know they have.

WooCommerce is a powerful platform, but it carries more database weight than a standard WordPress site. Add a dozen plugins, unoptimised product images, and a basic shared hosting plan, and you’ve got a slow store that frustrates customers and slides down Google’s rankings at the same time.

This guide covers exactly what to fix, in what order, with working code snippets tested on WordPress 6.x. No fluff, no vague advice — just the changes that actually move the needle.

Why WooCommerce stores slow down

WooCommerce does a lot more work than a standard WordPress blog. Every product page triggers multiple database queries — checking stock, loading product variations, calculating prices, fetching reviews. The checkout page alone can generate dozens of queries before a customer sees the payment form.

The problem compounds quickly:

  • Plugins — each active plugin can add its own scripts, styles, and database queries to every page load, whether they’re needed on that page or not
  • Unoptimised images — WooCommerce generates multiple image sizes for each product photo; if those images aren’t compressed or converted to modern formats, they add significant load time
  • Shared hosting — most entry-level hosting puts your site on a server shared with hundreds of others; when traffic spikes, your store slows down

Google’s Core Web Vitals — specifically Largest Contentful Paint (LCP), Interaction to Next Paint (INP), and Cumulative Layout Shift (CLS) — directly affect your search rankings. A slow WooCommerce store doesn’t just frustrate customers; it actively pushes you further down search results.

Start here — measure before you fix

Before touching a single setting, get a baseline. You need to know where you’re slow before you can fix it.

Tools to use:

  • Google PageSpeed Insights — free, measures Core Web Vitals on both mobile and desktop. Test your homepage, a product page, and your checkout page separately.
  • GTmetrix — free tier available, gives a detailed waterfall breakdown showing exactly which files are slowing your page down
  • Query Monitor — free WordPress plugin that shows how many database queries each page is running and how long they take

What to aim for:

MetricGoodNeeds work
LCPUnder 2.5 secondsOver 4 seconds
INPUnder 200msOver 500ms
PageSpeed score (mobile)Above 70Under 50

WooCommerce stores naturally score lower than simple blogs — a score of 65–75 on mobile is realistic for a well-optimised store. Anything under 50 needs attention.

Hosting — the fix most people skip

If your WooCommerce store is on a basic shared hosting plan costing $5–$10 a month, no amount of plugin tweaks will get you to where you need to be. Hosting is the foundation everything else sits on.

What to look for in WooCommerce hosting:

  • PHP 8.2 or higher — WooCommerce 8.x and WordPress 6.x both recommend PHP 8.2 for best performance; older PHP versions are significantly slower
  • Object caching support — look for hosts that offer Redis or Memcached out of the box
  • Server-side page caching — some managed hosts handle caching at the server level, which is faster than any WordPress caching plugin
  • Dedicated resources — managed WordPress hosting or a VPS gives your store guaranteed CPU and RAM rather than competing with other sites

The move from shared hosting to a quality managed WordPress host is typically the single biggest performance gain a small WooCommerce store can make — often cutting load times in half before any other changes.

Caching — the fastest performance win

Caching stores a pre-built version of your pages so WordPress doesn’t have to rebuild them from scratch for every visitor. For a WooCommerce store, this is the fastest win available.

Page caching vs. object caching

Page caching saves the full HTML output of a page and serves it directly to visitors without running PHP or database queries. This works well for static pages like your homepage, About page, and blog posts.

Object caching saves the results of database queries in memory (using Redis or Memcached) so they can be reused without hitting the database again. This is particularly valuable for WooCommerce because product pages, category pages, and cart calculations all rely on repeated database queries.

Caching plugins

  • WP Rocket — paid, easiest to configure correctly for WooCommerce, handles most settings automatically
  • LiteSpeed Cache — free, excellent performance, requires a LiteSpeed server (common on many managed hosts)
  • W3 Total Cache — free, more complex to configure but highly capable

Enabling Redis object cache

If your host supports Redis, add this to your wp-config.php file above the /* That's all, stop editing! */ line:

define( 'WP_CACHE_KEY_SALT', 'your-site-domain.com' );
define( 'WP_REDIS_HOST', '127.0.0.1' );
define( 'WP_REDIS_PORT', 6379 );
define( 'WP_REDIS_DATABASE', 0 );
define( 'WP_REDIS_TIMEOUT', 1 );
define( 'WP_REDIS_READ_TIMEOUT', 1 );

Then install the Redis Object Cache plugin and enable it from Settings > Redis. Confirm with your host that Redis is available and get the correct host/port values if they differ from the defaults above.

WooCommerce pages to exclude from page caching

These pages must never be cached, as they contain dynamic, user-specific content:

  • /cart/
  • /checkout/
  • /my-account/
  • /wc-api/

Most WooCommerce-aware caching plugins handle these exclusions automatically. If you’re configuring manually, add these paths to your plugin’s exclusion list.

Images — the second biggest culprit

Product images are typically the heaviest files on a WooCommerce page. WooCommerce generates multiple thumbnail sizes for each product photo, and if those images aren’t optimised, they add significant weight to every page load.

WebP conversion and lazy loading

WebP images are 25–35% smaller than equivalent JPEGs with no visible quality loss. WordPress 6.x has native WebP support built in — when you upload a JPEG or PNG, WordPress can automatically generate a WebP version.

To enable automatic WebP output via functions.php in your child theme:

/**
 * Enable WebP image output for uploaded images.
 * Compatible with WordPress 6.x native image handling.
 */
add_filter( 'image_editor_output_format', function( $formats ) {
    $formats['image/jpeg'] = 'image/webp';
    $formats['image/png']  = 'image/webp';
    return $formats;
} );

Important: This affects newly uploaded images. For existing product images, use the Regenerate Thumbnails plugin to rebuild all thumbnail sizes after adding this filter.

Lazy loading — where images only load as the user scrolls down — is enabled by default in WordPress 6.x via the native loading="lazy" attribute. No additional configuration is needed for standard WooCommerce product images.

Plugin alternative

If you prefer not to use code, ShortPixel or Imagify handle WebP conversion and compression automatically, including bulk processing of your existing product library.

Database optimisation

WooCommerce stores a lot of data, and over time that database grows with entries that are no longer needed. Expired transients, session data, and post revisions are the main culprits.

Limit post revisions

By default, WordPress saves unlimited revisions of every post and page. For a store with hundreds of products, this adds up fast. Add this to wp-config.php:

// Limit post revisions to 3 per post
define( 'WP_POST_REVISIONS', 3 );

Clean expired transients with WP-CLI

Transients are temporary data stored in the database. WooCommerce uses them heavily for caching things like product counts and shipping calculations. Expired transients that haven’t been cleared take up space and slow down database queries.

Run this WP-CLI command on your server (via SSH) to remove them:

wp transient delete --expired --allow-root

If you don’t have WP-CLI access, install WP-Optimize — it provides a dashboard interface for cleaning transients, revisions, and spam comments, and can schedule automatic cleanups.

Clean WooCommerce sessions

Abandoned cart sessions accumulate in the wp_woocommerce_sessions table. WooCommerce cleans these automatically via a scheduled task, but if that task has been disrupted you may have thousands of stale rows. This WP-CLI command clears them manually:

wp db query "DELETE FROM wp_woocommerce_sessions WHERE session_expiry < UNIX_TIMESTAMP();"

Replace wp_ with your actual database table prefix if it differs.

Reduce plugin overhead

Every active plugin has the potential to add scripts and styles to every page on your store, even pages where that functionality isn’t needed. A checkout page doesn’t need your contact form plugin loading its scripts. A product page doesn’t need your events calendar CSS.

Use Query Monitor to identify which plugins are adding the most database queries and page weight. Look for:

  • Plugins loading assets on pages where they’re not used
  • Plugins running slow queries (Query Monitor flags these in red)
  • Duplicate functionality covered by multiple plugins

For plugins that don’t offer selective loading, consider replacing them with lightweight code snippets added to your child theme’s functions.php. A single filter hook is almost always faster than an entire plugin.

WooCommerce-specific tweaks

Beyond general WordPress performance, WooCommerce has a few specific settings and scripts that add unnecessary weight when left at their defaults.

Disable cart fragments on non-cart pages

WooCommerce loads a script called wc-cart-fragment-refresh on every page of your site by default. This script makes an AJAX request to update the cart count in real time — useful on shop pages, but unnecessary overhead on your blog, About page, or landing pages.

Add this to your child theme’s functions.php:

/**
 * Disable WooCommerce cart fragments on non-WooCommerce pages.
 * Improves performance on pages where the cart widget is not displayed.
 * Compatible with WooCommerce 8.x and WordPress 6.x.
 */
add_action( 'wp_enqueue_scripts', function() {
    if ( ! is_woocommerce() && ! is_cart() && ! is_checkout() ) {
        wp_dequeue_script( 'wc-cart-fragments' );
        wp_deregister_script( 'wc-cart-fragments' );
    }
}, 11 );

Note: Only use this snippet if your header cart icon uses the WooCommerce cart fragments system. If you have a live cart count displaying in your navigation on non-shop pages, test carefully after adding this — the count will no longer update dynamically on those pages.

Disable WooCommerce scripts and styles on non-shop pages

WooCommerce loads its CSS and JavaScript on every page by default. On pages that have nothing to do with your shop, this is wasted load time.

/**
 * Dequeue WooCommerce styles and scripts on non-WooCommerce pages.
 * Compatible with WooCommerce 8.x and WordPress 6.x.
 */
add_action( 'wp_enqueue_scripts', function() {
    if ( ! is_woocommerce() && ! is_cart() && ! is_checkout() ) {

        // Dequeue WooCommerce styles
        wp_dequeue_style( 'woocommerce-general' );
        wp_dequeue_style( 'woocommerce-layout' );
        wp_dequeue_style( 'woocommerce-smallscreen' );
        wp_dequeue_style( 'woocommerce_frontend_styles' );
        wp_dequeue_style( 'woocommerce-inline' );
        wp_dequeue_style( 'wc-block-style' );

        // Dequeue WooCommerce scripts
        wp_dequeue_script( 'woocommerce' );
        wp_dequeue_script( 'wc-add-to-cart' );
        wp_dequeue_script( 'wc-cart-fragments' );
    }
}, 99 );

Test your site thoroughly after adding this — some themes and page builders integrate WooCommerce styles site-wide, and removing them can affect layout on non-shop pages. If anything breaks, comment out the style dequeue lines and keep only the script dequeue.

Frequently asked questions

How slow is too slow for a WooCommerce store? If your product pages take longer than 3 seconds to load on mobile, you’re losing customers. Google’s data shows 53% of mobile users abandon a page that takes more than 3 seconds to load. Aim for under 2.5 seconds for LCP on your most important pages.

Will a caching plugin break my WooCommerce checkout? A correctly configured caching plugin should exclude the cart, checkout, and My Account pages automatically. WooCommerce-aware plugins like WP Rocket do this out of the box. Always check your exclusion list after installation and test a complete checkout flow before going live.

My PageSpeed score is low on mobile but fine on desktop — is that normal? Yes, this is common for WooCommerce stores. Mobile testing uses a simulated slower connection and device, which exposes issues that desktop testing masks. Prioritise mobile scores — Google uses mobile-first indexing, so mobile performance directly affects your rankings.

Do I need a developer to implement these fixes? The wp-config.php and functions.php snippets in this guide require careful copy-paste and a child theme. If you’re not comfortable editing theme files, a WordPress developer can implement all of these changes in a few hours. The hosting migration and caching plugin configuration can usually be handled without developer help.

How often should I audit my WooCommerce store’s performance? After every major WooCommerce update, and any time you add or remove a plugin. WooCommerce releases major updates quarterly — it’s worth running a PageSpeed test after each one to catch any regressions before they affect sales.

Will these changes affect my WooCommerce store’s functionality? The snippets in this guide are conservative and widely used. The cart fragments and script dequeue snippets include conditional checks to ensure they only apply to non-shop pages. That said, always test in a staging environment first, and use a child theme so your customisations survive theme updates.


The bottom line

A slow WooCommerce store costs you sales every single day. The fixes aren’t complicated — better hosting, proper caching, optimised images, and a clean database will get most stores to where they need to be without touching a line of code.

Start with a PageSpeed baseline, address your hosting if it’s the bottleneck, then work through caching and image optimisation before reaching for the code snippets.

If you’d rather hand this off to someone who does it every day, get in touch with the Kursor Creative team — we audit and optimise WooCommerce stores for small businesses across Australia.

Written by

Matt

Matt has been working in the web industry for over 15 years, he is also an avid mountain biker. He discovered his love for the internet years ago and has since honed his skills to keep up with the latest trends and technologies in the industry. Matt has worked with a diverse range of clients, including small businesses, non-profits, and large corporations, delivering high-quality websites. Apart from his work, Matt loves to explore the outdoors and takes every opportunity to hit the trails on his mountain bike. His commitment to his work and passion for mountain biking have earned him a reputation as a talented and well-rounded individual. If you're in need of a skilled web developer or an adventure-seeking mountain biker, Matt is the perfect fit.

Let's build something
that works for you.

Free consultation. No lock-in contracts. Just honest advice on what your business actually needs.