WooCommerce Speed Optimization: 17 Ways To Make Your Slow Website, Store, And Product Pages Load Fast (2021 Updated Guide)

Have a slow WooCommerce site?

A slow WooCommerce site is almost always related to your infrastructure: hosting, theme, plugins, CDN, and your cache plugin are all high impact. However, there are quite a few things you can do inside WooCommerce to speed it up even more: clearing customer sessions, transients, and optimizing WooCommerce scripts, styles, cart fragments, and product images.

Is my site WooCommerce? No. But I’ve worked on several WooCommerce sites since doing speed optimization sine 2015. I listed the most common solutions based on my experience as well as feedback from multiple Facebook Groups. Leave me a comment if you have questions.

Slow-WooCommerce-Site

 

1. 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-Short

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.

Disable Cart Fragmentscart fragments update the cart total without refreshing the page but can also slow down your site. Check your GTmetrix or Pingdom Waterfall chart to see how long your cart fragment take to load.  I don’t recommend disable cart fragments until you have done all other WooCommerce speed optimizations since it’s actually a useful feature for your users.

WooCommerce Cart Fragments

 

2. 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 awhile as well.

Clear WooCommerce Transients Customer Sessions

 

3. Optimize Product Images

There are quite a few ways to optimize product images:

  • Properly size images – find huge images and resize them to correct dimensions.
  • Compress images – losslessly compress images using a plugin like ShortPixel.
  • Convert images to WebP – use a plugin to convert images to next-gen format.
  • Serve images through a CDN – if using a CDN URL which most CDNs use besides Cloudflare (e.g. https://x7r6b9v3.rocketcdn.me), make sure your images are being served from it. You can do this using Perfmatter’s CDN Rewrite option.
  • Disable hotlinking – prevent people from copying/pasting your images on their website (which consumes bandwidth). Do this using Cloudflare or WP Rocket.
  • Use adaptive images – use a plugin to serve smaller product images to mobile devices. It’s one of the few things you can do to improve your site’s mobile speed.
  • 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.

GTmetrix Image Optimizations

 

4. Go Easy On WooCommerce Extensions

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

WooCommerce Extensions

 

5. Use A Lightweight WooCommerce Theme And Page Builder

Many themes are page builders are slow.

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

Page builder migrations and polls on the fastest themes (click thumbnails to enlarge):

 

6. Unload Unused Assets

You’ve probably heard of Asset CleanUp and Perfmatters.

They let you selectively disable plugins and scripts from pages where they don’t need to load. I personally use Perfmatters because the UI/UX is much better, but either one should do the job.

Install one of these plugins then view the script manager. This requires testing (or a staging site) but you need to learn where your scripts are loaded. Once you learn this, you can disable them on current URLs, use regex to disable them based on URL patterns, or disable them everywhere but pages or posts. This will reduce JavaScript and CSS on your site (a PageSpeed Insights item).

Examples

  • Disable slider plugin on pages that don’t use sliders.
  • 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 social sharing plugin on all pages (since it’s usually for blog posts).
  • Disable unused functionality in your page builder (see this post for Elementor).

Disable-Elementor-Scripts

 

7. Hard Code When Possible

Headers, footers, menus, and blog sidebars should ideally be hard coded.

Try replacing plugins with manual code too where it makes sense. You shouldn’t need to rely on page builders for these areas since they add extra div wrappers and code bloat throughout your entire website and blog. At least consider hard coding things that appear site-wide. This was the first thing WP Johnny did when I hired him (I noticed a big improvement in PageSpeed Insights).

 

10. Configure A Solid 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
  • Whether you’ve configured the optimal settings

For free, I recommend either Swift Performance or WP Fastest Cache. But if you’re willing to drop $49, WP Rocket was rated #1 in most Facebook polls. That’s because it comes with a ton of features most cache plugins don’t, in which case you would need about 6 additional plugins:

  • Database cleanup (built-in to WP Rocket, or use WP-Optimize)
  • Heartbeat control (built-in to WP Rocket, or use Heartbeat Control)
  • Lazy load images/videos (built-in to WP Rocket, or use WP YouTube Lyte)
  • Host Google Analytics locally (built-in to WP Rocket, or use CAOS For Analytics)
  • Optimize Google Fonts (built-in to WP Rocket, or use CAOS For Fonts, or SHGF)
  • Integration with Cloudflare + other CDNs (built-in to WP Rocket, or use CDN Enabler)

WP Rocket was #1 in most Facebook polls (click thumbnails to enlarge):

Cache Plugin Tutorials:

 

9. Avoid Resource-Hungry Plugins

These are the most common plugins that drain CPU, but there’s a full list of them.

High CPU plugins usually include social share, statistic, calendar, page builders, chat, and plugins that run ongoing scans/processes or appear multiple times in GTmetrix.

  1. AddThis
  2. AdSense Click Fraud Monitoring
  3. All-In-One Event Calendar
  4. Backup Buddy
  5. Beaver Builder
  6. Better WordPress Google XML Sitemaps
  7. Broken Link Checker
  8. Constant Contact for WordPress
  9. Contact Form 7
  10. Contextual Related Posts
  11. Digi Auto Links
  12. Disqus Comment System
  13. Divi Builder
  14. Elementor
  15. View Full List Of 73 Slow Plugins

You can also find slow loading plugins in your GTmetrix Waterfall chart. If they appear multiple times, take a long time to load, or generate multiples requests, you will know something’s up.

Slow WordPress Plugin Waterfall

Or use Query Monitor (check the “queries by components” tab):

Query Monitor Slow Plugins

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

 

10. Remove Junk From Your Database

Use WP Optimize to clean your database thoroughly.

Some caching and speed plugins like WP Rocket let you clean your database, however they don’t let you delete tables left behind by old, uninstalled plugins. If you deleted a plugin, it leaves behind data (e.g. pre-configured settings) in your database. So if you don’t plan on using that plugin again, use WP-Optimize to delete it’s tables. These will be marked as “not installed.”

WP-Optimize-Tables

 

11. Block Bad Bots

Are bad bots crawling your site and consuming CPU?

You would never know this without checking. Bad bots can constantly hit your site and consume CPU with no benefit. It’s pretty common with WordPress so here’s how to block them.

Step 1: Install Wordfence.

Wordfence Security Plugin

Step 2: View your live traffic report.

Live-Traffic-Report-Wordfence

Step 3: Find spam bots in your live traffic report (if the same bot is constantly hitting your website and looks sketchy, Google it’s hostname to see if other people reported it as spam).

Step 4: Block the spam bots.

Wordfence-Blocking-Rule

Wordfence itself can cause high CPU (but is good for seeing IF you have spam bots). I recommend blocking them using the Blackhole For Bad Bots plugin, or with Cloudflare firewall rules. Wordfence and Cloudflare have a log so you can see whether the bots are actually being blocked. If successful, you can uninstall Wordfence and use Cloudflare or the Blackhole plugin.

Blackhole for Bad Bots

Cloudflare Firewall Rule To Block Bad Bots

 

12. Disable Heartbeat

The WordPress heartbeat shows you real-time plugin notifications and when other users are editing a post. It generates a request every 15-60 seconds. To disable heartbeat, add this code to functions.php or use WP Rocket, Heartbeat Control, or most speed plugins have an option.

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

WP-Rocket-Heartbeat-Control

 

13. Upgrade To PHP 8.0

WooCommerce sites should always be running a fast PHP version (i.e. PHP 8.0) 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).

WooCommerce PHP Benchmarks

You can upgrade to PHP 8.0 in your hosting account:

PHP 8.0

 

14. Optimize Google 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 through fonts.gstatic.com)

There are quite a few ways to optimize fonts. First, limit the number of font families, weights, and icons loaded on your site. Host them locally using Transfonter or the OMGF plugin. Next, satistify the “ensure text remains visible during Webfont load” item in PSI with WP Rocket or the Swap Google Fonts Display plugin. Finally, prefetch and try preloading fonts in WP Rocket or Perfmatters. Retrun your site through GTmetrix and hopefully the load times have improved.

GTmetrix Font Files

WP Rocket Prefetch Preload

 

15. Use Cloudflare APO, BunnyCDN, or QUIC.cloud

The two CDNs I recommend are Cloudflare + APO or BunnyCDN.

Cloudflare is usually fine for smaller sites on a budget, but it can actually slow down your WooCommerce site in some cases (you will need to test it). If using Cloudflare, it’s definitely worth $5/month to use the automatic platform optimization. Be sure to configure page rules, setup Firewall, enable hotlink protection, and use WP Cloudflare Super Page Cache if needed.

BunnyCDN is a more performant CDN. It’s recommended in multiple Facebook threads (including this one) above other CDNs. They have 50 data centers and you can choose your location(s) to only pay for certain locations. BunnyCDN uses pull zones and a CDN URL which you paste into WP Rocket or use the BunnyCDN plugin. Here are instructions for setting it up.

If you’re using LiteSpeed, you can also use their free QUIC.cloud CDN which is a solid choice.

CDN Choices

 

16. Check CPU Usage And Server Response Times

CPU usage can be checked in your hosting account. CPU issues are mostly due to high CPU plugins or cheap shared hosting (including SiteGround who is infamous for having unfixable CPU issues / CPU limits). Many recommendations in this guide should help you reduce CPU.

Server response times and TTFBs can be checked using PageSpeed Insights, GTmetrix, or KeyCDN’s performance test and should be under 200ms. This is mostly controlled by hosting.

Reduce-CPU-Usage-WordPress

Reduce Server Response Time

OMM TTFB

 

17. Reduce TTFB With Faster Hosting

Most hosting recommendations are garbage and I suggest joining the WordPress Hosting and WP Speed Matters group to get unbiased feedback because let’s be honest, we’re all affiliates.

  • SiteGround has a slow TTFB, CPU limits, support went downhill, among other issues. Unethical considering their community manager (Hristo) is an admin for this Facebook Group, and the TOS (sec. #9) prevents affiliates from using ‘SiteGround’ in bad reviews.
  • Hostinger writes fake reviews, votes for themselves in polls, also unethical.
  • GoDaddy is like my ex-girlfriend: lots of promises, but absolutely no delivery.
  • WP Engine used to be good, but most people left them and speed/support are awful.
  • EIG brands (Bluehost + HostGator) cram too many websites on slow, shared servers.

Regardless if you use my aff links, please don’t support unethical companies.

I use Cloudways (Vultr HF) who has always given me a fast TTFB and great GTmetrix results even on huge posts. You can click through my posts (most of them are very long) and they will load instantly. LiteSpeed is also popular which you can get through NameHero or A2 Hosting. I like NameHero’s Turbo Cloud plan which includes more RAM, NVME storage, and is still cheap.

Both are completely different setups. On Cloudways, I use WP Rocket with BunnyCDN. On a LiteSpeed hosting plan, you would be using the LiteSpeed Cache plugin with QUIC.cloud CDN. They’re both great setups and should give you a fast TTFB / server response time in GTmetrix, especially if you use my WP Rocket or LiteSpeed Cache tutorial to configure the ideal settings.

You can read my Cloudways review or NameHero review. NameHero is easier (cPanel, A+ support, email hosting) while Cloudways is a little “techier” but gives you better control of your server and has way more data centers in the US, India, UK, etc. Cloudways is monthly pricing with a free migration while NameHero has a 30-day refund policy and also has a free migration.

I switched from SiteGround to Cloudways in 2019. My response times were 2x faster, I was paying 1/2 the price of what I was on SiteGround, and had no CPU issues or high renewal prices.

Cloudways Shoutout

When in doubt, check Facebook polls:

Moving from SiteGround
eCommerce Hosting Poll

People who moved to Cloudways and posted results:

Cloudways Numbers
Cloudways-BuddyBoss

Hosting recommendations - Facebook thread

Cloudways Coupon Code
OMM25 gives 25% off your first 2 months at Cloudways

 

Frequently Asked Questions

Why is my WooCommerce site slow?

WooCommerce are naturally slower because they add extra WooCommerce scripts, styles, and cart fragments. They also usually requires more plugins. This is partially why WooCommerce sites can have poor load times in PageSpeed Insights and GTmetrix.

Should I disable WooCommerce scripts and styles?

You can safely disable WooCommerce scripts and styles if your not using them on non-eCommerce pages.

Should I disable cart fragments?

It's not recommended you disable cart fragments unless you have done all other speed optimizations. Still, cart fragments can be helpful for your visitors which you should consider before disabling.

Why are my product pages slow?

Optimizing images is the most important part of making individual product pages load faster. This includes avoiding huge images and compressing, lazy loading, and serving them from a CDN. Trying using WebP.

How many plugins is too much for WooCommerce?

It's not the number of plugins that slow down your site, it's the quality. You can easily run over 30 lightweight plugins without them having hardly affect on your load time.

I hope this helped! Comment if you have questions.

Cheers,
Tom

About Tom Dupuis

Tom Dupuis 2017Tom Dupuis writes WordPress speed and SEO tutorials out of his apartment in Denver, Colorado. In his spare time, he plays Rocket League and watches murder documentaries. Read his bio to learn 50 random and disturbing things about him.

Subscribe
Notify of
guest
3 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments