Speed Up Your Slow WooCommerce Store In 20 Steps (How Your Hosting And CDN Treat Dynamic Requests Is A Major Factor)

Speed up slow woocommerce

Have a slow WooCommerce site?

Two ways to speed up WooCommerce are with Redis and Cloudflare’s Argo Smart Routing + Tiered Cache which specifically help speed up dynamic content. You can get both these from Rocket.net with their free Cloudflare Enterprise who also uses 32 CPU + 128GB RAM and NVMe.

While a good host/CDN is likely the biggest factor of WooCommerce speed (and TTFB), you can also configure the Disable WooCommerce Bloat and make generic optimizations. This includes using a fast WooCommerce theme, optimizing product images, and using a better cache plugin.

WooCommerce plugins are also notorious for loading across your entire site. Perfmatters or Asset CleanUp can disable plugins and individual CSS/JS files where they don’t need to load.

And since WooCommerce adds extra CSS/JS, make sure you check your Chrome Dev Tools coverage report to find your largest CSS/JS files. Check whether they’re loading from your theme, plugins, or third-party code. Because WooCommerce sites usually have more plugins, it’s especially important to consolidate/minimize plugins and to make sure they’re lightweight.

Summary: WooCommerce speed almost always comes down to your infrastructure (hosting, CDN, theme, plugins, and cache plugin). There’s a lot of misinformation out there on which one is best, so make sure you check specs and feedback in Facebook Groups like WP Speed Matters.

 

1. Use Cloud Hosting With Cloudflare Enterprise

First off, skip the shared crap and use cloud hosting instead. SiteGround, Hostinger, and WPX aren’t built for WooCommerce sites which have more dynamic requests and can’t be cached (this can lead to CPU limit/PHP worker issues). Most of these hosts also lack CPU/RAM and use slow SATA SSDs with memcached (which is inferior to Redis). For WooCommerce hosting, you ideally want cloud hosting with Redis, NVMe SSDs, LiteSpeed, and a good amount of CPU/RAM.

Some cloud hosts also started using Cloudflare Enterprise (Rocket.net, Cloudways, Kinsta) which is a far superior CDN than most. It has one of the largest networks of 270+ PoPs with speed/security features like Argo Smart Routing + Tiered Cache (great for WooCommerce), full page caching, prioritized routing, image optimization, load balancing, Brotli, HTTP/3, and WAF.

Rocket.net and their free Cloudflare Enterprise is the only host with all these and is who I use. Looking at their specs, it’s private cloud hosting with 32 cores + 128GB RAM, NVMe SSDs, Redis, and LiteSpeed’s PHP. This alone blows mainstream hosts like Kinsta/WP Engine out of the water.

When comparing their Cloudflare Enterprise to Cloudways/Kinsta, Rocket.net’s is free, setup automatically, and uses full page caching (unlike Cloudways). And unlike Kinsta’s, Rocket.net has Argo Smart Routing, load balancing, and image optimization. Rocket.net also doesn’t limit PHP workers (like Kinsta does) because only about 10% of traffic hits your origin server. This is also why they allow 10-25 more monthly visits. Not to mention the CEO (Ben Gabler) was Chief Product Officer at StackPath and has experience building CDNs, so I trust their integration more.

View Spreadsheet

Omm ttfb speedvitals 1
Test your site 3 times in SpeedVitals to see your average TTFB worldwide (this ensures resources are cached)
Keycdn global ttfb
You can also check KeyCDN’s performance test or click through my site to see how fast it loads

12 things to know about hosting/TTFB

  1. Hosting is the #1 factor of site speed.
  2. TTFB is a key indicator of hosting performance.
  3. TTFB is part of core web vitals and is 40% of LCP.
  4. TTFB also affects INP (since latency is part of TTFB).
  5. SpeedVitals tests TTFB in 35 locations – use this tool!
  6. Test your site 3 times to get accurate numbers in SpeedVitals.
  7. Doing this ensures your caching and CDN are working properly.
  8. Check your average TTFB worldwide in your 3rd SpeedVitals test.
  9. Google flags your TTFB if it’s over 600ms, but under 200ms is better.
  10. PageSpeed Insights (and other testing tools) only test TTFB in 1 location.
  11. WP Hosting Benchmark also tests hosting performance (here are my results).
  12. Combining a good host/CDN is arguably the best way to improve TTFB (using a host with improved specs on top of Cloudflare Enterprise hits 2 birds with 1 stone).

Step 1: Create a Rocket.net account then add the coupon OMM1 (in step 2) to get your first month for $1. It’s $25/mo when paying yearly or $30/mo when paying monthly. If you sign up with my affiliate link, I’ll get a commission which helps me write these tutorials. Thank you :)

Rocket. Net omm1 coupon

Step 2: Request a free migration. They did this the same day and let me review my website before it was launched with no downtime. For the record, their support is better than Kinsta’s and you can reach out to Ben Gabler or his team (via phone/chat/email) if you have questions.

Step 3: Upgrade to PHP 8.1 and ask support to install Redis (they use Redis Object Cache). These are the only things I did since Cloudflare Enterprise and backups are both automatic.

Step 4: Retest your TTFB in SpeedVitals and click through your pages to see the difference. You can also search their TrustPilot profile for people mentioning “TTFB” where they’re rated 4.9/5.

Rocket. Net woocommerce elementor

Rocket. Net vs cloudways vultr hf trustpilot review
People are starting to see the light! (read review). But they use LiteSpeed’s PHP + Nginx (not LiteSpeed servers)

Kinsta to rocket. Net migrationMoved to rocket. Net vs sitegroundRocket. Net positive review

Rocket. Net facebook review 1Rocket. Net vs kinstaKinsta to rocket. Net ttfb redis

Problems with mainstream hosts

I’ve written some pretty bad reviews about SiteGround’s slow TTFB, CPU limits, and why SG Optimizer does a poor job with core web vitals (they also control several Facebook Groups and threaten to sue people who write bad reviews). Hostinger writes fake reviews and is only cheap because you get less resources like CPU/RAM. Kinsta and WP Engine are way too expensive for how many resources, PHP workers, and monthly visits you get. Along with major incidents like WPX’s worldwide outage and SiteGround’s DNS getting blocked by Google for 4 days (both WPX and SiteGround denied responsibility). One thing is clear: most mainstream hosts appear to be more interested in profits than performance. Please do your own research before getting advice.

 

2. Install Redis

Redis is arguably faster than memcached and better for CPU usage.

You’ll need a host that supports Redis (i.e. Rocket.net, Cloudways). Kinsta charges $100/mo for Redis which is ridiculous. The steps to install Redis are different for each host, but you’ll usually activate it in your hosting account, then you’ll install a Redis plugin such as Redis Object Cache.

Google instructions for your specific host.

Redis object cache plugin settings

 

3. Enable Full Page Caching

This caches HTML and can reduce dynamic requests while greatly improving TTFB.

Some hosts have full page caching like Rocket.net, SiteGround, and Kinsta. If your host doesn’t support it, use Cloudflare’s APO, Super Page Cache for Cloudflare, or FlyingProxy. FlyingProxy has several Cloudflare Enterprise features (among other optimizations) which is a bonus. Gijo Varghese from FlyingProxy and Ben Gabler from Rocket.net both have their own opinions, but I prefer Rocket.net since you’re hitting 2 birds with 1 stone (fast hosting + Cloudflare Enterprise).

Rocket. Net cloudflare enterprise vs. Flyingproxy

 

4. Enable Argo Smart Routing

Cloudflare’s Argo Smart Routing routes traffic through the fastest network paths and can also speed up dynamic requests. You can either set it up directly in Cloudflare (which costs money) or use a third-party service (Rocket.net/Cloudways). But it’s not supported by FlyingProxy yet.

Cloudflare argo

 

5. Set Cache TTL To 1 Month

Most static sites want a cache TTL of 1 year, but WooCommerce sites should usually set this to around 1 month. You can do this in your hosting account or use Cloudflare’s browser cache TTL to override it. Since WooCommerce sites change somewhat frequently, this clears the cache more frequently (but not too much where it significantly increases CPU usage). The concept is similar to your cache plugin’s preloading… you should ideally only preload important URLs in the sitemap (not the full sitemap) and control preloading with a cron job. Instead of rebuilding the cache every time an action is triggered, you’ll schedule it, for example, to run once at night.

Cloudflare browser cache ttl 1 month

 

6. Increase Memory Limit

WooCommerce sites usually want to increase the memory limit to at least 256MB. Here’s how:

Step 1: Edit wp-config.php file.

Step 2: Add the code before the line that says, “Happy Blogging”.

define('WP_MEMORY_LIMIT', '1024M');
Cloudways memory limit
Some hosts let you increase the memory limit in their dashboard

 

7. Remove WooCommerce Bloat

Disable WooCommerce Bloat removes WooCommerce bloatware and can speed up the frontend and admin panel. In the front end, you can disable WooCommerce scripts, styles, and cart fragments. In the admin, you can disable features to make your admin cleaner and faster. Perfmatters also has options to remove WooCommerce bloat, but this plugin does a better job.

Disable woocommerce bloat plugin

Disable WooCommerce Scripts And Styles – WooCommerce loads 3 stylesheets throughout your site (woocommerce-layout.css,woocommerce-smallscreen.css, and woocommerce.css). Since you don’t need these loading on every  page, disable them on non-eCommerce content.

Disable WooCommerce Junk In The Admin – remove WooCommerce admin junk: widgets, analytics, notifications, status meta box, marketplace suggestions, and extensions submenu.

 

8. Clear Customer Sessions And Expired Transients

In your WooCommerce Status settings, clear customer sessions and expired transients.

As explained in this article, clearing customer sessions helps when the wp-options table grows too fast usually due to ineffective cron jobs or bots crawling your WooCommerce site and creating sessions on the fly. Clearing expired transients should be done once in a while as well.

Clear woocommerce transients customer sessions

 

9. Optimize Product Images

There are quite a few ways to optimize WooCommerce product images (and all images):

  • Properly size images – find huge images and resize them to correct dimensions.
  • Compress images – lossless compression using a CDN or plugin (i.e. ShortPixel).
  • Convert images to WebP – use a plugin or CDN to serve images in WebP format.
  • Serve images through a CDN – CDN URLs (https://cdn.mydomain.com) are used by most CDNs. Make sure images and other files are served from it. You can do it by adding it to your cache plugin’s CDN settings or use Perfmatters’ CDN Rewrite.
  • Disable hotlinking – prevent people from copying/pasting your images on their website which consumes bandwidth. Found in your hosting account/Cloudflare.
  • Resize images for mobile – Cloudflare’s image resizing and adaptive image plugins serve smaller images to mobile. This should also help your mobile LCP.
  • Lazy load images – lazy load images that appear below the fold (exclude above the fold images). Can be done using many speed plugins, otherwise try Optimole.
  • Preload above the fold images – FlyingPress/Perfmatters can preload critical images where you set a number of images typically shown above the fold. They will be excluded from lazy load and preloaded, improving LCP. This is easier (and often more effective) than excluding/preloading above the fold images manually.
  • Specify dimensions – most cache plugins have an option to add missing image dimensions. If you still see the “explicit width/height” PSI error, edit the image’s HTML and add a width/height attribute manually. This also prevents layout shifts.

Image optimization pagespeed insights

 

10. Go Easy On WooCommerce Extensions

Just like plugins, too many WooCommerce extensions also slow down your site.

Woocommerce extensions

 

11. Use A Lightweight WooCommerce Theme And Page Builder

Elementor, Divi, and other page builders add extra CSS and JavaScript to your site which hurts multiple items in PageSpeed Insights. WP Jonny even offers page builder removal as part of his speed optimization service (he is currently hard coding my header, menu, footer, and sidebar) so I can completely remove Elementor and use Gutenberg blocks instead). There is a big trend in Facebook Groups of people removing their page builder and posting better GTmetrix scores.

Recommend Themes

Fastest wordpress themes
See the test

 

12. Unload Unused Assets

Many WooCommerce are infamous for loading across your entire site.

Asset CleanUp and Perfmatters can disable plugins, scripts, and styles from loading on certain pages/posts. I use Perfmatters since the UI/UX is better and has a lot more optimizations than “asset unloading.” which are often not found in cache plugins (see the comparison table below).

Install one of these, enable test mode, and view the script manager in your top admin menu when viewing your site. You will need to know where things are actually being loaded on your site, then you can disable them from current URLs, use regex to disable them based on URL patterns, or disable them everywhere but pages or posts. This will reduce CSS/JS on your site.

Examples

  • Disable WooCommerce plugins where they don’t need to load.
  • Disable both slider/gallery plugins on pages that don’t use them.
  • Disable rich snippets plugin on pages that don’t use rich snippets.
  • Disable contact form plugin on pages that don’t have a contact form.
  • Disable WooCommerce scripts and styles on non-eCommerce pages.
  • Disable affiliate link management plugin on pages that don’t use aff links.

Disable plugins perfmatters

Asset CleanUp SG Optimizer WP Rocket FlyingPress Perfmatters
Asset unloading x x x
Delay JavaScript x x
Remove unused CSS x x Inline Separate file Separate file
Critical CSS x x x
Host analytics locally x x x x
Smaller GA tracking code x x x x
Host fonts locally x x
Font-display: swap
Exclude above the fold images x By class By URL By number By number
Preload critical images x By class By URL By number By number
Lazy load background images x Inline Helper class Helper class CSS
Specify image dimensions x x
Preload links x x
Preload scripts/styles x x x x
Disable XML-RPC x x x
Disable Heartbeat x
Move wp-login x x x x
Change autosave interval x x x x
Limit post revisions x x x x

 

13. Hard Code When Possible

Your header/footer/sidebar should be hard coded – don’t use bloated page builders for these!

Why would you use a bloated page builder to build something that loads across the entire site? If you want to design pages in them, that’s fine, but don’t use them here. This was the first thing WP Johnny did when I hired him and noticed a major improvement in my core web vital scores.

Wp johnny page builder removal service
Johnny offers this as a service because it makes a huge difference

 

14. Configure A Better Cache Plugin

There are 3 factors when it comes to cache plugins:

  • If you’re using a cache plugin
  • Which cache plugin you’re using (FlyingPress and LiteSpeed Cache are best).
  • Settings (I have extensive configuration guides for nearly every major cache plugin).

Omm switches to flyingpress
 

15. Avoid Resource-Hungry Plugins

Some plugins add CSS/JS to the frontend while others increase CPU usage. Here’s a fuller list.

Plugin Category Memory Impact PageSpeed Impact
Analytify Analytics X
Backup Buddy Backup X
iThemes Security Security X
Broken Link Checker SEO X
Jetpack Security X X
Query Monitor Analytics X
NextGEN Gallery Gallery X X
Site Kit by Google Analytics X
Wordfence Security X
wpDiscuz Comments X X
WPML Translate X X
Yoast SEO SEO X

You can also install Query Monitor (check the “queries by components” tab):

Slow wordpress plugins query monitor

WP Hive is a handy Chrome Extension for seeing whether plugins in the WordPress repository will have an impact on memory usage, PSI scores, and other speed data. Install the extension, view a plugin in the WordPress repository, and view the data in the “WP Hive Insights” section.

Wp hive slow plugins

 

16. Remove Junk From Your Database

Use WP Optimize to clean your database thoroughly.

Some cache plugins clean your database but don’t let you delete tables left behind by old plugins. If you deleted a plugin, it leaves behind data (i.e. pre-configured settings). So if you don’t plan on using it again, use WP-Optimize to delete the tables marked as “not installed.”

Wp optimize unused database tables

 

17. Block Bad Bots

Bad bots hitting your site and consuming resources is a common problem.

I recommend Cloudflare’s bot fight mode or Blackhole For Bad Bots. You can also install Wordfence and view your live traffic report to see bots hitting your site in real-time. However, Wordfence can increase CPU usage if it’s not configured properly so I would only use it to find bad bots, then uninstall it when you’re done. Also make sure you check your analytics (i.e. in Cloudflare) to make sure bots are actually being blocked. This can help save server resources.

Wordfence live traffic report

 

18. Disable Heartbeat

Heartbeat shows real-time plugin notifications and when other users are editing a post. It creates a request every 15-60s. Add the code to functions.php or many speed plugins have an option to disable it (I suggest disabling the backend/frontend, then reduce it in the post editor).

add_action( 'init', 'stop_heartbeat', 1 );
function stop_heartbeat() {
wp_deregister_script('heartbeat');
}

Wp rocket heartbeat settings

 

19. Optimize Fonts

View your GTmetrix Waterfall tab to see:

  • How long your fonts take to load
  • How many requests your fonts created
  • Whether your fonts are served locally or third-parties (i.e. fonts.gstatic.com)

There are quite a few ways to optimize fonts. First, limit the number of font families, weights, and icons loaded. Next, host them locally using Perfmatters, OMGF, or Transfonter. You can fix “ensure text remains visible during Webfont load” in PSI using most cache plugins or Swap Google Fonts Display. Finally, preload any above the fold fonts. Loading fonts inline and Cloudflare Workers are a few other strategies (and using custom icons when using Elementor).

Third party google fonts

 

20. Upgrade To PHP 8

WooCommerce sites should always be running a fast PHP version (i.e. PHP 8+) which you can upgrade in your hosting account. Higher PHP versions make your site run much faster, even though most WordPress users run outdated PHP versions (since they don’t know how to do it).

Kinsta php benchmarks

Upgrade to PHP 8 in your hosting account:

Php 8. 0

Why is my WooCommerce site slow?

While WooCommerce adds extra CSS/JS and requires more plugins, a slow website is almost always related to your infrastructure. This includes hosting, CDN, theme, plugins, and your cache plugin.

I hope this helped! Comment if you have questions.

Cheers,
Tom

You Might Also Like: