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

Have a slow WooCommerce site?

You can speed up a slow WooCommerce site by clearing customer sessions, deleting transients, and optimizing WooCommerce scripts, styles, cart fragments, and product images. Increasing memory limit to 256MB and using good cache plugin with a CDN are recommend. Cloud hosting is also much faster at loading heavy WooCommerce resources than shared hosting.

Is my site WooCommerce? No. But my developer and I have made multiple WooCommerce sites to typically load 3x faster. And if you need help, you can hire him on freelancer.com for $40/hour. He has a perfect 5 star review, an extensive portfolio of websites he’s optimized. I’ve been working with him since 2011 (his name is Pronaya) and can’t recommend him enough.

Otherwise, follow this guide and feel free to post questions (or your results) in the comments.

Slow-WooCommerce-Site

 

1. Disable Cart Fragments

The easiest way to disable WooCommerce cart fragments, scripts, and styles, is with Kinsta’s perfmatters plugin. It also lets you disable unused widgets (including WooCommerce widgets) to make the admin load faster and has other features like disabling the WooCommerce status metabox, disabling scripts on a page/post basis, limiting post revisions, autosaves, heartbeat control, and other things that can reduce CPU and make your WooCommerce site load faster. If you don’t want to pay $25/year, I listed alternative methods below (using code from Github).

perfmatters woocommerce optimization

By default, WooCommerce uses cart fragments which is used to update the shopping cart without refreshing the page. But this isn’t needed on your homepage (or other pages) and can be disabled for better performance. Otherwise, cart fragments will load on every single page.

What cart fragments will usually do to your GTmetrix/Pingdom report:

WooCommerce Cart Fragments

To disable cart fragments, add the code to your funtions.php file:

 

2. Disable WooCommerce Styles

WooCommerce loads 3 stylesheets on every page of your website. Since you probably don’t want these loading on every single page, you should disable them on non-eCommerce content.

  • woocommerce-layout.css
  • woocommerce-smallscreen.css
  • woocommerce.css

WooCommerce styles in query monitor

Disable all WooCommerce stylesheets:

Disable specific stylesheets:

If you disabled specific stylesheets, you will need to add your own:

Another alternative is to only load the CSS styles and Javascripts on WooCommerce product and shop pages, by dequeuing them on all of your other pages. Here is the code from Github:

 

3. Disable WooCommerce Scripts

WooCommerce also causes lots of scripts:

WooCommerce Scripts

The solution below only loads WooCommerce scripts on the shop, checkout, and cart pages.

Add this to your functions.php:

If that doesn’t work, there are a few alternative solutions on Github people had success with.

perfmatters also lets you disable scripts on specific pages. For example, I don’t need my rich snippet or Thirsty Affiliates plugin loading on my homepage, so I disabled it. Selectively disabling scripts/plugins to load on specific pages can reduce load times.

perfmatters script manager

 

4. Clear Customer Sessions

In your WooCommerce Status settings, clear customer sessions:

Clear Customer Sessions

 

5. Clear WooCommerce Transients

In your WooCommerce Status settings, delete all transients:

Delete WooCommerce Transients

 

6. Disable The WordPress Heartbeat API

The WordPress heartbeat API shows you real-time plugin notifications, and when other users are editing a post. This generates a request every 15-60 seconds and will drain CPU, so it’s best to use a plugin like Heartbeat Control plugin to disable it, or at least limit it to 60 seconds.

Heartbeat-Control-Plugin

If using WP Rocket, they also have an option for this:

WP-Rocket-Heartbeat-Control

 

7. Use A Lightweight WooCommerce Theme

I always recommend StudioPress themes which are also recommended by Matt Cutts and even Matt Mullenweg. Many themes, including Avada, are bloated with unnecessary features, and some themes may not be coded or maintained well. StudioPress is supported by a reliable team (recently acquired by WP Engine) with documentation, frequent updates, support, and coded with speed, SEO, and security in mind. I use their Outreach Pro theme and am loving it.

StudioPress eCommerce themes

Themes I recommend from ThemeForest:

Slow WooCommerce theme

 

8. Resize Product Images To Smaller Dimensions

This is what serve scaled images means in GTmetrix.

GTmetrix tells you which images are too large, and the correct dimensions they should be resized to. Save the image from GTmetrix, resize it to the correct dimensions, and replace the old image with the new one. Do this with all oversized images on your WooCommerce site.

I suggest starting with images that appear on multiple pages (eg. logo + sidebar images) then working your way through individual pages, since GTmetrix only shows image errors for the single page you test. I also recommend creating an “image cheat sheet” as I’ll explain below.

Serve Scaled Images

Create a cheat sheet for your most commonly used images:

  • Slider images: 1903(w) x 400(h)
  • Carousel images: 115(h)
  • Widget images: 414(w)
  • Fullwidth blog post images: 680(w)
  • Featured images: 250(w) x 250(h)

 

9. Don’t Use Too Many Extensions

Just like plugins, too many WooCommerce extensions will make your website slow:

WooCommerce Extensions

 

10. Use 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
  • 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)

2016 best cache plugin poll

2019 cache plugin poll

Swift vs WP Rocket

2016 cache plugin poll

Best cache plugins 2018 poll

wp rocket vs w3 totla cache

Cache Plugin Tutorials:

 

11. 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 65 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

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

Query Monitor Slow Plugins

You don’t need that many plugins!

Too many WooCommerce plugins

 

12. Delete Unused Themes + Deactivated Plugins

All themes and plugins you don’t used should be deleted. Deactivated plugins and unused themes store settings in your database and are unnecessary. If you’re not using it, delete it!

Delete-Unused-WordPress-Themes

 

13. Compress Images With ShortPixel

This is what optimize images means in GTmetrix.

I use ShortPixel which is what one of the most popular image optimization plugins, with Imagify, Kraken, and Smush also being popular. All these plugins do the same thing – compress images, strip EXIF data, and optionally resize images that are too large. Once you’ve configured the settings, compress a few images in the Media section. If you’re happy with the quality, bulk compress all images on your site. Though, I would still take a backup just in case.

ShortPixel Settings

Check out my full guide to optimizing images in WordPress for more tips.

Image Optimizations In GTmetrix

  • Serve scaled images: resize large images to correct dimensions
  • Specify image dimensions: specify a width/height in the image’s HTML or CSS
  • Optimize images – losslessly compress images
  • Combing images using CSS sprites – combine multiple images into 1 image
  • Avoid URL redirects – don’t serve images from wrong www or http(s) version
  • Use a content delivery network – serve images/files from a CDN
  • Leverage browser caching –  cache images/files using your cache plugin
  • Make favicon small and cacheable – use a 16x16px favicon and cache it

 

14. Clean Your WooCommerce Database

You can use WP-Optimize or WP Rocket to schedule a database cleanup every 1-2 weeks. This deletes garbage files like expired transients, spam comments, pingbacks, trackbacks, database tables, drafts, and the potentially thousands of post revisions that accumulate over time (that is, if you don’t use plugin like permatters to limit them). Always take a backup before doing it!

WP-Optimize plugin

WP-Optimize Clean Database

 

15. Clean Your WordPress Backend With Clearfy

There’s a lot of stuff built-in to WordPress you probably don’t need. Clearfy can help you clear it up. You can usually disable jQuery Migrate, RSD links, wlwmanifest link, shortlinks, post revisions, autosaves, heartbeat, dashicons, and many other options. Perfmatters is good too.

Clearfy Performance Settings

Kinsta’s permatters plugin is similar, but comes with even more features:

perfmatters features

 

16. Block Bad Bots

Are bad bots crawling your site and consuming CPU? They were for me, a lot of them actually.

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 site and looks suspicious, Google it’s hostname and 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

 

17. Upgrade To PHP 7.4

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

WordPress PHP Stats

Check which PHP version you’re currently running in the Status section of WooCommerce:

WooCommerce PHP Version

Then upgrade to PHP 7+ in your hosting account:

PHP-7.4

Some plugins are not always compatible with higher PHP versions (another reason you should be careful which plugins you use). Run the PHP Compatibility Checker to make sure your plugins are compatible. If they are, you can safely upgrade, but check your website for errors.

 

18. Combine Google Fonts

Google Fonts are external resources and will show up in your GTmetrix/Pingdom report:

Google Fonts Pingdom

Option 1: Install Autoptimize and use “Combine and link in head” option:

Autoptimize Combine Google Fonts

Option 2: Try the CAOS for WebFonts plugin:

CAOS-Fonts

Option 3: Download your fonts directly from Google Fonts (be selective with fonts and font weights), convert them to web fonts using Transfonter, then add them to your CSS manually.

Transfonter-Google-Font-Conversion

 

19. Setup Cloudflare’s Free CDN

There’s absolutely no reason you shouldn’t be using Cloudflare’s CDN.

It hosts your website on 200+ data centers across the world. This reduces the distance between your server and visitor, while offloading resources to their data centers (putting less stress on your origin server). Cloudflare is easy to setup – sign up for a free plan, run the scan, and they will assign you 2 namesevers which you will change in your hosting account. You can do other things with Cloudflare like enable hotlink protection, Rocket Loader, and utilize page rules to make your WooCommerce site even faster – all done in your Cloudflare dashboard.

Cloudflare-Data-Centers

Multiple CDNs = more data centers = faster delivery of your content. If you want to go the extra mile, use both Cloudflare and a CDN like StackPath (I use both). StackPath has 31 additional data centers. While Cloudflare requires you to change nameservers, StackPath (and other CDNs) will ask you for your website, then generate a CDN URL which you will paste into your cache plugin (most have an option for this), or you can also use the CDN Enabler plugin.

StackPath-Data-Centers

 

20. Pinpoint The Problem With Query Monitor

Query Monitor has a ton of information that can help you debug why your WooCommerce site is slow. It shows you slow loading queries, PHP errors, hooks and actions, block editor blocks, enqueued scripts and stylesheets, HTTP API calls, and more. Fixing items in Query Monitor may require some technical knowledge, but is worth hiring a developer who can fix the issues.

You can also use AWStats (commonly found in the “statistics” section of your hosting count which tells you which bots, images, files, and other elements that are consuming the most CPU.

 

21. Ignore Google PageSpeed Insights (Use GTmetrix)

If you join the WordPress Speed Up Facebook Group, or look at WP Rocket’s article, you’ll learn that Google PageSpeed Insights is not a great tool for measuring (or optimizing) your site – it doesn’t even measure load times! Pingdom is one of the most accurate tools for measuring load times, but for actual performance recommendations I (and most people) prefer GTmetrix.

When testing your WooCommerce site, always check your GTmetrix Waterfall chart to see which requests take longest to load (eg. WooCommerce cart fragments, specific plugins, etc).

The only thing Google PageSpeed Insights is good for is measuring server response times:

Reduce Server Response Time

 

22. Avoid EIG Hosting

The same company (EIG) owns over 60 different hosting companies. It is well-known in Facebook Groups that they pack too many people on the same server, use outdated PHP versions and speed technology, and don’t care about clients. Cheap hosting = cheap results.

  • Are you using an EIG brand (Bluehost, HostGator, Site5, iPage, HostMonster)?
  • Are you running your WooCommerce site on a $4/month hosting plan (eg. GoDaddy)?

Don’t expect a WooCommerce site to be fast on a cheap hosting plan, let alone have a decent server response, time to first byte, and enough CPU to compensate for lots of extra plugins. Generally, WooCommerce sites need a better hosting plan to compensate for more plugins, scripts, and CPU usage. And EIG, GoDaddy, and other low quality plans aren’t going to cut it.

List-Of-EIG-Brands

Bluehost-EIG-Feedback

 

23. Check CPU Usage And Server Response Times

Is your server slow? Run your site through Bitcatcha or PageSpeed Insights to see if it is. If you have high server response times or time to first byte, it has something to do with your hosting.

Bitcatcha Server Speed Report

Reduce-CPU-Usage-WordPress

GTmetrix-Time-To-First-Byte

 

24. Use Fast Hosting That Can Support WooCommerce

Shared hosting may not have enough server resources especially if you’re running high CPU plugins, page builders, Google AdSense, or get a decent amount of traffic. And it’s especially not a good idea to run WooCommerce or WPML on shared hosting since they are resource-hungry.

Hosting recommendations are usually garbage.

Join the WordPress Hosting Facebook Group to get unbiased feedback. Most members (myself too) swear by Cloudways WordPress Hosting. Specifically DigitalOcean / Vultr High Frequency.

Yes, it’s a little more expensive at $10-$13/month, but we’re talking about speed here – not being cheap. With Cloudways, you have a choice of using DigitalOcean, Vultr High Frequency, Google Cloud, AWS, or Linode. These are worlds faster than shared hosting and can handle resource-intensive tasks much better (Elementor, Beaver, Divi, WooCommerce, AdSense, etc).

Cloudways makes it easy to test them out and see the difference in your load times: they do free migrations, monthly pricing, a Migrator plugin, and a promo code to save money: OMM25

Here’s what happened when I moved:

SiteGround vs Cloudways

GTmetrix tests are always different, but even posts with a huge page 2.70MB page size and 96 requests can often load in under 2s. I’ll also take a 148ms time to first byte any day of the week. That post has 70+ images, 480 comments (showing Gravatars), Font Awesome, and Elementor.

OMM-TTFB

The evidence is there:

Cloudways Response TimesCloudways-Migration-Result
Cloudways Google PageSpeed
WP Engine To Cloudways
DigitalOcean Pingdom Report
Hosting-Recommendation
Moving-From-WPX
SiteGround-Alternatives
Preferred-Web-Hosting
UntitledWPEngine-To-Cloudways
Godaddy DigitalOcean Migration
Cloudways Pingdom Load Times
Cloudways Pingdom Report
Elementor-Hosting
Web-Hosting-France
SiteGround-Alternative
VPS-Cloud-Hosting

 
This was a simple Pingdom test to measure load times of 16 WordPress hosts. I signed up for popular hosting companies then installed the same Astra Starter Site on each of them while measuring load times in Pingdom for 1 week at 30 minute check intervals. Some domains are still live (cwdoserver.com is hosted on a $10/month Cloudways DO plan and stgrndserver.com is hosted on SiteGround GrowBig). I cancelled most of them because it was getting expensive. Even when browsing through their pages or running your own tests, you can see the difference.

WordPress-Hosting-2020-Pingdom-Test

Hosting Companies You Should Avoid

  • SiteGround – they have gone completely downhill in recent years.
  • Bluehost – slow servers, owned by EIG, bad support, rated poorly in FB Groups.
  • HostGator – also owned by EIG with slow servers, bad support, CPU limit issues.
  • GoDaddy – top malware hosting network worldwide, rated poorly in FB groups.
  • Hostinger – they write fake reviews and vote for themselves in Facebook polls.
  • WP Engine – also not what it used to be, expensive and not even fast anymore.
  • *A2 Hosting – if you can’t afford Cloudways, A2 is still fast and uses LiteSpeed.

I use Cloudways because:

  • Even posts with a 2.70MB page size can load in under 2s
  • DigitalOcean and Vultr HF are miles faster than shared hosting.
  • It’s $10-$13/month (no yearly contracts or high renewal prices).
  • Varnish, Redis, and memcached are all built-in for higher performance.
  • You get to pick from DigitalOcean, Vultr HF, Linode, AWS, Google Cloud.
  • 4.8/5 star TrustPilot rating and highly recommended in Facebook Groups.
  • They have 25+ data centers between all their cloud hosting providers.
  • No CPU issues like on SiteGround, Bluehost, and other shared hosting.
  • SSL, staging, and backups are all very easy in the Cloudways dashboard.
  • Support used to be average, but is now really good as reflected on TrustPilot.
  • They offer a free migration but their Migrator plugin will also do the trick.
  • Adding a server, migrating your site, and the dashboard is actually very easy.
  • Mustasaam (their community manager) gave me peace of mind when moving.
  • Only complaint is they need to add LiteSpeed servers to their list of providers.

Affiliate Disclaimer – if you sign up for Cloudways using my affiliate link, I would seriously appreciate it. I don’t recommend bad hosting like many other affiliates. I also donate quite a bit to charity ($6,000 to GoFundMe so far) and your support would really help. I try to base my reviews not only from my experience, but real evidence from the overwhelming feedback in numerous Facebook Groups. It would mean a lot.

Just do your research and look at this Facebook thread.

 

Frequently Asked Questions

🚀 Why are WooCommerce sites slow?

WooCommerce are naturally slower because they have extra WooCommerce scripts, styles, and cart fragments. They also usually requires more plugins. That's why most WooCommerce sites have poor load times and scores in GTmetrix.

🚀 How do you optimize cart fragments?

You can use the Perfmatters plugins to optimize WooCommerce cart fragments, scripts, and styles.

🚀 What are the 5 most important speed factors?

Skip shared hosting all together and go with cloud hosting, upgrade to the latest PHP version, reduce and consolidate plugins, and optimize images + external fonts using plugins like ShortPixel and OMGF. Using a CDN and cleaning the database helps too.

🚀 How do you optimize product pages?

Optimizing images is the most important part of making individual product pages load faster. There are 3 main ways to optimize images in GTmetrix: serve scale images (resizing them to correct dimensions), compress images using a plugin like ShortPixel, and specify image dimensions in the HTML. Remove EXIF data and serve images from a CDN as well.

🚀 What if you're running lots of plugins?

If you are running lots of plugins, especially if they are not lightweight (see my list of slow plugins), you will need to make sure all other elements of your site are completely optimized and that you're using faster hosting to support the website's resource needs.

I hope this helped! Comment if you have questions.

Cheers,
Tom

How To Reduce CPU Usage In WordPress (And Avoid Getting Bandwidth Limit + CPU Errors Where Your Site Gets Shut Down)

CPU overages are a classic sign your server is being overloaded.

You can reduce CPU usage by removing heavy plugins, heavy page builders, database junk, disabling WordPress heartbeat, blocking bad bots, and using a good cache plugin with a CDN.

The other (and more likely) reason for high CPU is that you’re using shared hosting which is infamous for having strict CPU limits (just check your host’s terms and conditions page). If you exceed them, you will likely run into 503 errors or your website will become extremely slow. GoDaddy, Bluehost, HostGator, and SiteGround all have limits. “Unlimited bandwidth” is a lie.

I’m guessing 90% of people reading this article are on shared hosting when you can easily fix this by moving to someone like Cloudways. Sign up for a $10/month DigitalOcean plan, request a free migration, and retest your CPU usage, server response times, and GTmetrix load times. This has already been done by people who posted their migration results. They’re also the most recommended host in Facebook Groups with numerous #1 ratings in hosting polls on Facebook.

Regardless, this tutorial will help you reduce your WordPress site’s CPU usage. Follow along :)

Reduce-CPU-Usage-WordPress

 

1. Check Your Website’s CPU Usage

Most hosting dashboards have an option to check CPU usage.

It should never be close to 100% (you want the server to be relaxed). Many hosts also have AWStats which identifies how much CPU certain bots, images, and files are consuming. If you notice something specific is consuming lots of CPU, address it. For example, bad bots can be blocked using the Blackhole For Bad Bots plugin, and images can be optimized to load faster.

Reduce-CPU-Usage-WordPress

Check Your Server Response Time – it’s also a good idea to run your site through Google PageSpeed Insights to check your server response time which Google says should be >200ms.

Reduce Server Response Time

 

2. Ditch Shared Hosting

Shared hosting may not have enough server resources especially if you’re running high CPU plugins, page builders, Google AdSense, or get a decent amount of traffic. And it’s especially not a good idea to run WooCommerce or WPML on shared hosting since they are resource-hungry.

Hosting recommendations are usually garbage.

Join the WordPress Hosting Facebook Group to get unbiased feedback. Most members (myself too) swear by Cloudways WordPress Hosting. Specifically DigitalOcean / Vultr High Frequency.

Yes, it’s a little more expensive at $10-$13/month, but we’re talking about speed here – not being cheap. With Cloudways, you have a choice of using DigitalOcean, Vultr High Frequency, Google Cloud, AWS, or Linode. These are worlds faster than shared hosting and can handle resource-intensive tasks much better (Elementor, Beaver, Divi, WooCommerce, AdSense, etc).

Cloudways makes it easy to test them out and see the difference in your load times: they do free migrations, monthly pricing, a Migrator plugin, and a promo code to save money: OMM25

Here’s what happened when I moved:

SiteGround vs Cloudways

GTmetrix tests are always different, but even posts with a huge page 2.70MB page size and 96 requests can often load in under 2s. I’ll also take a 148ms time to first byte any day of the week. That post has 70+ images, 480 comments (showing Gravatars), Font Awesome, and Elementor.

OMM-TTFB

The evidence is there:

Cloudways Response TimesCloudways-Migration-Result
Cloudways Google PageSpeed
WP Engine To Cloudways
DigitalOcean Pingdom Report
Hosting-Recommendation
Moving-From-WPX
SiteGround-Alternatives
Preferred-Web-Hosting
UntitledWPEngine-To-Cloudways
Godaddy DigitalOcean Migration
Cloudways Pingdom Load Times
Cloudways Pingdom Report
Elementor-Hosting
Web-Hosting-France
SiteGround-Alternative
VPS-Cloud-Hosting

 
This was a simple Pingdom test to measure load times of 16 WordPress hosts. I signed up for popular hosting companies then installed the same Astra Starter Site on each of them while measuring load times in Pingdom for 1 week at 30 minute check intervals. Some domains are still live (cwdoserver.com is hosted on a $10/month Cloudways DO plan and stgrndserver.com is hosted on SiteGround GrowBig). I cancelled most of them because it was getting expensive. Even when browsing through their pages or running your own tests, you can see the difference.

WordPress-Hosting-2020-Pingdom-Test

Hosting Companies You Should Avoid

  • SiteGround – they have gone completely downhill in recent years.
  • Bluehost – slow servers, owned by EIG, bad support, rated poorly in FB Groups.
  • HostGator – also owned by EIG with slow servers, bad support, CPU limit issues.
  • GoDaddy – top malware hosting network worldwide, rated poorly in FB groups.
  • Hostinger – they write fake reviews and vote for themselves in Facebook polls.
  • WP Engine – also not what it used to be, expensive and not even fast anymore.
  • *A2 Hosting – if you can’t afford Cloudways, A2 is still fast and uses LiteSpeed.

I use Cloudways because:

  • Even posts with a 2.70MB page size can load in under 2s
  • DigitalOcean and Vultr HF are miles faster than shared hosting.
  • It’s $10-$13/month (no yearly contracts or high renewal prices).
  • Varnish, Redis, and memcached are all built-in for higher performance.
  • You get to pick from DigitalOcean, Vultr HF, Linode, AWS, Google Cloud.
  • 4.8/5 star TrustPilot rating and highly recommended in Facebook Groups.
  • They have 25+ data centers between all their cloud hosting providers.
  • No CPU issues like on SiteGround, Bluehost, and other shared hosting.
  • SSL, staging, and backups are all very easy in the Cloudways dashboard.
  • Support used to be average, but is now really good as reflected on TrustPilot.
  • They offer a free migration but their Migrator plugin will also do the trick.
  • Adding a server, migrating your site, and the dashboard is actually very easy.
  • Mustasaam (their community manager) gave me peace of mind when moving.
  • Only complaint is they need to add LiteSpeed servers to their list of providers.

Affiliate Disclaimer – if you sign up for Cloudways using my affiliate link, I would seriously appreciate it. I don’t recommend bad hosting like many other affiliates. I also donate quite a bit to charity ($6,000 to GoFundMe so far) and your support would really help. I try to base my reviews not only from my experience, but real evidence from the overwhelming feedback in numerous Facebook Groups. It would mean a lot.

Just do your research and look at this Facebook thread.

 

3. Eliminate High CPU Plugins

These resource-hungry plugins are CPU killers.

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

  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 65 Slow Plugins

Find Slow Loading Plugins
If the same plugin shows up multiple times in your GTmetrix report, or it takes a long time to load in your Waterfall tab, you may want to find an alternative plugin that is more lightweight.

Slow WordPress Plugin

Query Monitor
Query Monitor shows your slowest plugins, scripts, styles, queries, PHP errors, and information to pinpoint CPU issues. Delete the plugin when you’re done since it can cause high CPU in itself.

Queries-By-Component

 

4. Rethink Your Page Builder

Oxygen is the fastest, otherwise your page builder could be causing high CPU.

Even Elementor adds a ton of scripts to your website (which you can see in Asset CleanUp or Perfmatters) and makes the front end and admin panel run slower, requiring more resources.

Elementor Scripts 1

 

5. Clean Your Database

Most people are using WP Rocket (if you’re not, you should) which has an option to clean your database. Otherwise, use a plugin like WP-Optimize. Keep your database clean by running a scheduled cleanup once every 1-2 weeks. People who edit their content a lot will accumulate thousands of post revisions which can be deleted if you don’t need old versions of the content.

WP-Rocket-Database-Settings

One thing I like about WP-Optimize is that it lets you go through your actual database tables and delete tables left behind by old plugins. This happens when you install and plugin then delete it. If you don’t plan on using the plugin again, delete the table (shown as Not Installed).

WP-Optimize-Tables

 

6. Upgrade To PHP 7.4

Login to your hosting account and find the area to update PHP versions.

Upgrade to the highest possible version and check your website for errors (if you see any, revert to an earlier version). Some hosts are slower to release PHP versions than others, but hosts like Cloudways and SiteGround are usually very quick. As you see below, my site is running PHP 7.4.

PHP-7.4

 

7. Offload Resources To CDNs

CDNs reduce bandwidth by offloading resources to data centers. Cloudflare or WP Rocket’s RocketCDN will greatly reduce server loads. Caching 58.88GB of bandwidth in 1 month is huge.

Cloudflare and RocketCDN are both very good (I personally use RocketCDN which uses StackPath’s data centers) but you should only use one. Some hosts have an option to activate Cloudflare in your hosting account (eg. SiteGround), otherwise you will need to sign up for Cloudflare and change nameservers. RocketCDN can be set up in WP Rocket’s CDN settings.

Cloudflare-Bandwidth-Savings

 

8. Disable WordPress Heartbeat

The WordPress Heartbeat API shows real-time plugin notifications, when other users are editing a post, etc. Since it consumes resources, it should be disabled or limited. Do this by adding the code below to your functions.php file, use WP Rocket, or Heartbeat Control plugin.

Disable Heartbeat

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

 

9. Disable Usage Tracking From Plugins

Plugins like to get stats from you, but this also consumes a small amount of CPU.

Usage-Tracking

 

10. Disable Unused Plugin Functionality

If you have a robust plugin installed but you only use a few of it’s features, disable the ones you don’t use. Some common examples are Elementor plugins, JetPack, and unused Yoast features. This is especially true for plugins that run ongoing processes (eg. Broken Link Checker, Query Monitor, stats plugin, or even plugins that send you notifications in the WP admin or via email).

Disable-Addons

 

11. Disable SiteGround’s SG Site Scanner

If you’re getting CPU overages on SiteGround and you paid for their SG Site Scanner, try contacting their support team to turn this off. The ongoing scans may be causing high CPU.

SiteGround-SG-Site-Scanner

 

12. Disable Resource-Hungry WooCommerce Features

WooCommerce sites naturally require more CPU. This is something to keep in mind when choosing hosting, and I highly advise not use WooCommerce on shared hosting.

Optimizing Woocommerce

  • Disable WooCommerce cart fragments
  • Disable WooCommerce scripts and styles
  • Disable WooCommerce widgets
  • Disable WooCommerce status metabox
  • Disable automatic product feed plugins

Most of these can be done using the Perfmatters plugin, otherwise search on GitHub.

perfmatters woocommerce optimization

You will also want to clear customer sessions in your Status settings

 

13. Check For Errors With Your Cache Plugin

A few things related to cache plugins can affect CPU:

  • Whether you’re using a cache plugin
  • Which cache plugin you’re using
  • Whether the settings are configured optimally
  • Whether your cache plugin is giving you CPU issues

To answer the first three, I recommend WP Rocket since it has more speed optimization features than any other cache plugin (that’s why it’s #1 in Facebook polls and yields great results). See my recommended WP Rocket settings. And to answer the fourth, see below.

Common Fixes In WP Rocket

WP Rocket says:

Occasionally some of the options on the File Optimization tab, such as Remove Query Strings, or Minify/Combine can cause high CPU usage in cases where your site has a lot of CSS or JS files. Try disabling these options and then monitor your CPU usage.

There have also been reports that critical path CSS and preloading can increase CPU. You can use a plugin to increase the preload crawl interval from 500ms (the default) to 1.5s or higher.

Common Fixes In W3 Total Cache

  • Test object cache + database cache
  • Delete and reinstall the plugin

Why WP Rocket?
It has more features than most cache plugins, which means you don’t need to install extra plugins for these, while giving you better results. Otherwise you will need to research which features your cache plugins comes with, then install these plugins if it doesn’t support them:

Some hosts like GoDaddy and WP Engine blacklist cache plugins because they have their own built-in caching system. In this case, use Autoptimize to optimize HTML, CSS, JavaScript (it also has a CDN option). See my recommended Autoptimize settings.

You can also try disabling your cache plugin and checking CPU usage. If your cache plugin is indeed causing issues, reach out to the plugin developer (or switch plugins).

2016 best cache plugin poll

2019 cache plugin poll

Swift vs WP Rocket

2016 cache plugin poll

Best cache plugins 2018 poll

wp rocket vs w3 totla cache

 

14. Reduce Bloat

By “bloat” I’m referring to WordPress heartbeat, autosaves, post revisions, pingbacks, and all the “miscellaneous” things that consume CPU and should generally be disabled. Unfortunately, many of these are built-in to WordPress. Perfmatters and Clearfy are both good options. I like Perfmatters because it’s strictly a bloat removal plugin and comes with a script manager for selectively disabling plugins, while Clearfy tries to do SEO + security (and no script manager).

perfmatters settings

 

15. Block Bad Bots

You would never know if bad bots are hitting your server without checking.

Download Wordfence and view your live traffic report to see which bots are hitting your server in real-time. Obviously there are some good bots (eg. Googlebot) but if you see suspicious bots constantly hitting your server, Google their “hostnames” to see if other people are reporting them as bad. If they’re bad, blocking them can prevent them from consuming server resources.

Live-Traffic-Report-Wordfence

Methods For Blocking Bad Bots

Cloudflare Firewall Rule To Block Bad Bots

Monitor the log to make sure it’s working (screenshot is for Cloudflare):

Cloudflare-Firewall-Events

 

16. Optimize Images

Images can consume lots of bandwidth, as shown in AWStats:

File-Type-Bandwidth

There are 3 main ways to optimize images in GTmetrix.

Image-Optimization

  • Serve scaled images – resize large images to be smaller
  • Specify image dimensions – specify a width/height in the HTML (see screenshot)
  • Optimize images – losslessly compress images (I recommend TinyPNG)

Start by optimizing images that appear on multiple pages (logo, sidebar, footer images). Then run your most important pages through GTmetrix and optimize individual images on those. The first item you should work on is “serve scaled images” since this requires you to scale (resize) an image to the correct dimensions, upload the new image version to WordPress, and replace it.

Hotlink protection can be enabled in Cloudflare (or sometimes your hosting account). This prevents people from copying/pasting your images onto their own website, which sucks up bandwidth. This usually happens if you have high quality images on your site (eg. photography).

Cloudflare Hotlink Protection

 

17. Reduce WP-Cron Jobs

The wp-cron is loaded on every page load and schedules automated tasks like publishing scheduled posts, checking for theme and plugin updates, and sending email notifications. Instead of running it on every page load, you can schedule it to run every 90 minutes or so.

Step 1: Disable WP Cron Jobs

Add the code to wp-config.php, before where it says “That’s all, step editing! Happy blogging.”

define('DISABLE_WP_CRON', true);

Step 2: Replace With A Real Cron Job
You still need wp-cron (eg. checking for theme/plugin updates), just not on every page load. Each host has their own instructions for this, here is SiteGround’s tutorial. You can set the cron job to run every 90 minutes, or increase it even more if you don’t have lots of scheduled tasks.

 

18. Block Comment Spam

An ongoing accumulation of spam comments isn’t good for your CPU usage. The Anti-Spam plugin has always worked well for me (I tested plenty of others) and it doesn’t use CAPTCHA.

 

19. Protect Your WP-Admin

Attacks are commonly targeted at the WP admin which consumes high amounts of CPU.

The easiest way to fix this is to move your wp-login page (since bots usually just target the default login page). You can do this with Perfmatters or Move Login. You can also try limiting login attempts and if using Cloudflare, create a page rule to bypass the cache inside the admin.

WordPress-Admin-Page-Rule

 

20. Minimize Third Party Requests

Run your site through PageSpeed Insights to see which third party scripts load on your site.

Third-Party-Usage

Google AdSense and Tag Manager usually consume high CPU since they’re heavy (and little optimization can be done to them). But other third party scripts can definitely be optimized: my WordPress speed guide shows you how to optimize Google Fonts, Analytics, Gravatars, embedded YouTube videos, and others. Many of these can be optimized using WP Rocket and Flying Scripts (it’s how I’m able to use wpDiscuz + Gravatars without them affecting GTmetrix).

Prefetching third party scripts (eg. in WP Rocket) will also help:

Prefetch-DNS-Requests

 

21. Avoid Resource-Hungry Themes

I highly recommend Oxygen or StudioPress.

They’re much more lightweight than Elementor which is what most people use Astra themes with. While Astra + Elementor may be the most popular, it’s definitely now the fastest. View my source code to see how many times Elementor shows up; my next redesign will be on Oxygen.

Astra-Themes-Facebook-Poll

 

22. Delete Unused Plugins + Themes

Unused themes store preconfigured settings in your WordPress database (similar to plugins). Go to Appearance > Themes then delete all the WordPress themes you’re not currently using.

Delete-Unused-WordPress-Themes

 

23. Host Download Files On Dropbox

I barely have any files to download on my website so the bandwidth is low enough where I don’t worry about this. But if you have tons of large files that suck up bandwidth when people download them, consider uploading them to Dropbox or another file sharing website and pointing people there. That way dropbox.com will be handling the bandwidth and not you.

Download-Bandwidth

 

Frequently Asked Questions

✅ What is the easiest way to reduce CPU in WordPress?

Find and eliminate high CPU plugins, update to PHP 7.4, configure a good cache plugin with optimal settings, using a CDN, and disable unneeded WordPress functions like the Heartbeat API. Upgrading to faster hosting will obviously help.

✅ Which plugins consume the most CPU?

Social sharing, statistic (analytic) plugins, sliders, portfolios, page builders, calendars, chat, contact forms, related post, sitemap, Wordfence, WPML, and any plugin that runs ongoing scans or processes. These can be found using Query Monitor or GTmetrix Waterfall.

✅ Does all shared hosting have CPU limits?

Yes. Even though some shared hosting companies claim to have unlimited bandwidth, they still enforce CPU limits. This is usually found in their terms are conditions.

✅ Does WooCommerce cause high CPU?

WooCommerce sites generally require more plugins, and often times, more CPU. If these are not selected carefully, the extra resources consumed by those plugins can put stress on your server. WooCommerce sites also load extra scripts, styles, and cart fragments which don't help either. WooCommerce sites are better off on cloud hosting.

✅ How can I check my website's CPU consumption?

Your hosting account should tell you how much CPU you're consuming. Some hosts have tools like AWStats which show specific images, bots, and other resources that consume lots of resources.

Let me know if this tutorial worked in the comments!

See Also: WordPress Speed Guide

Cheers,
Tom