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

The Ideal WP Rocket Settings For 2020 With Tips For CDNs, Fonts, Images, And Third Party Script Optimization: Latest Version 3.7.0.1

WP-Rocket-Settings

These are the same WP Rocket settings I used to get this GTmetrix report.

WP Rocket was rated #1 in numerous Facebook polls because it comes with more speed optimization features than any other cache plugin. That’s why it usually yields better results in GTmetrix, Pingdom, and PageSpeed Insights. It also means you don’t need to install a bunch of extra plugins for optimizing Google Fonts, Google Analytics, heartbeat, delaying JavaScript, etc.

This guide goes beyond configuring WP Rocket’s settings and goes into more detail about further optimizing fonts, third party scripts, delaying JavaScript so you can do things like show Gravatars without impacting GTmetrix, which CDN to use, deleting old plugin tables, and using prefetching + preloading. If you still need help, drop a comment with your GTmetrix report URL.

If you haven’t bought WP Rocket yet, I would appreciate you using my affiliate link. I also donate a good chunk of my affiliate income to charity. You can get 10% off by going to their Coupons Page, sign up for their email list, and they will send you a code.

 

1. Dashboard

Leave both options off unless you want to be a beta tester or let WP Rocket collect your data anonymously which results in a (very small) performance decrease. RocketCDN is covered in the CDN section which I recommend using instead of Cloudflare. You can clear the cache or regenerate critical CSS if you make design/plugin changes but they don’t appear on your site.

WP-Rocket-Dashboard-Settings

 

2. Cache

These are good cache settings as long as you don’t use a plugin for your mobile website and don’t allow multiple users to login to your site (eg. bbPress). I increased cache lifespan from 10 to 24 so the cache doesn’t have to refresh as often, which saves a little bit on server resources.

WP-Rocket-Cache-Settings

Mobile Cache – enables caching for mobile devices. Only enable “separate cache files for mobile devices” if you use a plugin for your mobile website (like the free version of WP Touch).

User Cache – leave disabled unless you have multiple users logging into your website (bbPress for example) where there is user-specific content. It gives each user their own cached version.

Cache Lifespan – a lower number means the cache will refresh more frequently, but it consumes more resources. A cache lifespan with a higher number means it won’t refresh as frequently, but saves resources. Do you care more about your cache building frequently or saving server resources? Since I only publish a couple posts a week, I increased it to 24 hours.

 

3. File Optimization

All HTML, CSS, and JavaScript settings should be enabled individually while testing your site for visible errors. These are the file optimization settings I use which gave me the best results in GTmetrix, but you should be testing your GTmetrix report to check the impact of each setting.

WP-Rocket-File-Optimization-Settings-2020

Minify Files – enables minification of HTML, CSS, and JavaScript. Check your site for visible minification errors after enabling each one. If you see any, view your source code, find the problematic CSS or JavaScript files, and exclude them from being minified. That way, you still get the benefits on minification (just not for that file). Otherwise, they should all be enabled.

Combine Files – just like minify, enable and check your site for errors.

Exclude CSS + JS – if for some reason a minification option messes up your site layout, locate the problematic file and add it here. See WP Rocket’s post on resolving issues with minification.

Optimize CSS Delivery – your page will start loading without CSS styles which is a depreciated item in PageSpeed Insights. WP Rocket automatically generates this for you. WP Rocket says:

“By enabling these options you may see an improvement in your performance grade on GTmetrix, Pingdom Tools, and Google PageSpeed Insights. Results will vary from site to site. Always remember to test the effect on the speed of your site. “

Remove jQuery Migrate – removes the jQuery migrate file which automatically loads in WordPress (and creates an additional request) but is usually not needed on most websites.

Load JavaScript Deferred – loads JavaScript after the page has finished parsing.

Safe Mode For jQuery – only enable if you see errors on your website when enabling the previous option (load JavaScript deferred). This excludes the jQuery file from being deferred.

Delay JavaScript Execution – this feature alone reduced my blog’s load time by about 3s on each post by delaying comments and Gravatars (for example, to delay Gravatar loading, just add the word “Gravatar”). While WP Rocket delays loading until user interaction, the Flying Scripts plugin is similar but it creates a timeout period (in seconds) until the JavaScript is loaded. I still use Flying Scripts but you can test each one out yourself. It requires some testing, but delaying heavy JavaScript files like comments, Gravatars, or sharing buttons can greatly improve loads.

 

4. Media

Most sites should enable everything especially in the lazyload settings. If you use embedded YouTube videos on your site, replacing the YouTube iframe with a preview image can cut load times in half since videos are very heavy. You’ll also still need a plugin to create WebP images.

WP Rocket Media Settings

Lazy Load – delays loading of images, iframes, and videos until you scroll down the page and they become visible. This significantly reduces initial load times and HTTP requests, but constantly loading images as you scroll can be annoying (test it out for yourself). Always lazy load videos and replace iframes with a preview image since embedded videos are very heavy.

Pro tip on lazy loading videos in Elementor – Adam from WP Crafter made a YouTube video on using Elementor to load videos faster. When I tested it, the results were great. Not only was I able to embed videos with 0 GTmetrix errors, but I could also customize colors, play buttons, and overall branding of videos. Unfortunately my blog doesn’t use Elementor (only my pages), but I recommend following his video if yours does – especially if you see GTmetrix errors when enabling WP Rocket’s lazy loading.

Disable Emojis – emojis slow down your site. You can also disable them under Settings → Writing → Formatting then enable “do not convert emoticons.”

Disable WordPress Embeds – similar to Cloudflare’s hotlink prevention, it prevents other sites from embedding your content on their site which sucks up bandwidth and stresses your server.

WebP Caching – enable if you’re using WebP images. If you’re not using WebP images already, you should since they load faster and look nicer than JPEG + PNG. Using WebP also fixes the serve images in next-gen format item in PageSpeed Insights. You will still need a plugin that converts images to WebP. I use WebP Converter For Media plugin but Imagify, ShortPixel, and most image optimization plugins have an option to convert images to WebP (TingPNG does not unfortunately). Finally, check your image files in the source code to make sure they use .webp.

 

5. Preload

Preloading is done automatically by WP Rocket when you activate it with your XML sitemap. Prefetching and preloading fonts are especially important for optimizing fonts and third party scripts which you can find in the Reduce DNS Lookups section of your GTmetrix YSlow report.

WP-Rocket-Preload-Settings-2020

Preloading – tell browsers to start fetching resources that will be needed soon.

Preload Links – according to WP Rocket’s article, this feature makes it so if a user hovers over, or touches, a link for 100ms or more, the HTML of that page will be fetched in the background, so that when they actually click the link, the page will appear to load nearly instantly.

Prefetch DNS Requests – run your site through GTmetrix and look at the Reduce DNS Lookups section in your YSlow report. You will see all third party scripts loading on your site which can be anything from Google Fonts to Google Analytics, Maps, ASense, Tag Manager, YouTube, or even social media platforms if you embed social posts or use social share buttons on your blog.

WordPress External Scripts

Grab all those URLs from your report and paste them into the Prefetch DNS Requests section of WP Rocket. This will help browsers anticipate those external requests and load them faster.

Or use this list of common domains to prefetch as a reference:


//maps.googleapis.com
//maps.gstatic.com
//fonts.googleapis.com
//fonts.gstatic.com
//use.fontawesome.com
//ajax.googleapis.com
//apis.google.com
//google-analytics.com
//www.google-analytics.com
//ssl.google-analytics.com
//www.googletagmanager.com
//www.googletagservices.com
//googleads.g.doubleclick.net
//adservice.google.com
//pagead2.googlesyndication.com
//tpc.googlesyndication.com
//youtube.com
//i.ytimg.com
//player.vimeo.com
//api.pinterest.com
//assets.pinterest.com
//connect.facebook.net
//platform.twitter.com
//syndication.twitter.com
//platform.instagram.com
//referrer.disqus.com
//c.disquscdn.com
//cdnjs.cloudflare.com
//cdn.ampproject.org
//pixel.wp.com
//disqus.com
//s.gravatar.com
//0.gravatar.com
//2.gravatar.com
//1.gravatar.com
//sitename.disqus.com
//s7.addthis.com
//platform.linkedin.com
//w.sharethis.com
//s0.wp.com
//s1.wp.com
//s2.wp.com
//stats.wp.com
//ajax.microsoft.com
//ajax.aspnetcdn.com
//s3.amazonaws.com
//code.jquery.com
//stackpath.bootstrapcdn.com
//github.githubassets.com
//ad.doubleclick.net
//stats.g.doubleclick.net
//cm.g.doubleclick.net
//stats.buysellads.com
//s3.buysellads.com

Preload Fonts – copy your font files from GTmetrix Waterfall (they have a tab for font files) and paste them in WP Rocket’s preload fonts field. Retest your website and they should load faster.

Google-Fonts-Waterfall

 

6. Advanced Rules

Advanced Rules are mainly for eCommerce sites, however WP Rocket is already compatible with most solutions like WooCommerce and BigCommerce. But if you’re having issues with cart widgets, caching, or something related to eCommerce, WP Rocket has documentation for that.

Otherwise, leave this blank.

WP-Rocket-Advanced-Rules

Never Cache URLs – if you’re using an eCommerce shopping cart that is not supported by WP Rocket, add your cart and checkout pages here which will exclude these pages from the cache.

Never Cache Cookies – same principle as previous option only based on cookies.

Never Cache User Agents – prevent Googlebot or other user agents from caching pages.

Always Purge URLs – let’s say you have a blogroll on your homepage. If you create a new post, you want that homepage blogroll updated immediately by emptying the homepage cache. That’s what this setting does, however WP Rocket automatically clears the cache for your homepage, categories and tags once new content is created… so there is usually no need for this. But if there are other page’s cache you want cleared when new content is posted, add it.

Cache Query Strings – mainly used to cache search result pages + price filters on eCommerce.

 

7. Database

Scheduling database cleanups keeps your site and admin fast, just know what you’re deleting!

WP-Rocket-Database-Settings

  • Revisions – old versions of your posts which are saved when you hit “Publish.”
  • Auto Drafts – automatically saved versions of your post if you don’t hit “Publish.”
  • Trashed Posts – posts and drafts you deleted.
  • Spam Comments – comments marked as spam.
  • Trashed Comments – comments marked as trash.
  • Expired Transients – transients that have expired and are still in your database.
  • All Transients – stores data that takes a long time to retrieve (eg. social counts on blogs).
  • Optimize Tables – optimizes database tables to run more efficiently.
  • Automatic Cleanup – how often you want WP Rocket to clean your database.

Delete Unused Plugin Tables (Not With WP Rocket) – one thing WP Rocket doesn’t do is let you go through your individual database tables and delete tables left behind by old plugins that aren’t installed anymore. I recommend installing WP-Optimize and going through your tables every so often, especially if you deleted plugins (plus it shows you the actual size of the tables). The tables that say “not installed” are the ones that were left behind by old, uninstalled plugins.

WP-Optimize-Tables

 

8. CDN

I recommend using RocketCDN instead of Cloudflare if you have the budget.

RocketCDN uses StackPath’s data centers which are usually faster and have better compatibility than Cloudflare. RocketCDN is $6.99/month (cheaper than buying StackPath directly at $10/month). Many people who setup Cloudflare actually see increased load times. WP Rocket says you shouldn’t use RocketCDN on top of Cloudflare – only use 1 single CDN.

WP Rocket’s CDN tab is only meant for setting up RocketCDN and other CDNs that use CDN URLs (such as KeyCDN or BunnyCDN). It’s not meant for setting up Cloudflare which requires changing nameservers and configuring the Cloudflare tab.

  • Choose either RocketCDN (recommended) or Cloudflare
  • Use the CDN tab for RocketCDN or Cloudflare tab for Cloudflare

WP-Rocket-CDN-Settings-2020

Testing CDNs – since Cloudflare is set up differently and requires changing nameservers, the “content delivery network” in GTmetrix YSlow will be red (but will be green for other CDNs).  That doesn’t mean Cloudflare isn’t working; use the Claire Chrome Extension to make sure it is.

Exclude Files From CDN – lets you serve files locally instead of the CDN. Usually, these files come from plugins designed to disregard cross domain load. In most cases, there is no need.

Example:

  • {uploads_dir}/wpcf7_captcha/*
  • {uploads_dir}/imagerotator.swf
  • {plugins_dir}/wp-fb-autoconnect/facebook-platform/channel.html

 

9. Heartbeat

Instead of using the Heartbeat Control plugin, WP Rocket has it built-in.

The WordPress Heartbeat API tells you when other users are editing a page/post and shows you real-time plugin notifications. You usually want to disable Heartbeat completely, or at least reduce it, since it consumes resources and contributes to CPU overages (eg. on SiteGround).

WP-Rocket-Heartbeat-Settings

 

10. Add-Ons

If you’re using any of these services, activate it’s add-on.

WP-Rocket-Add-Ons

Google Tracking – fixes the “leverage browser caching” issue for Google Analytics in your GTmetrix report by hosting Google Analytics locally. If it’s still not 100%, use the Flying Analytics plugin. If you’re using Google Analytics, remember to optimize it in the Preload tab.

Facebook Pixel  – enable if using Facebook Pixel to host it locally. If you’re using Facebook Pixel, remember to optimize it in the Preload tab.

Varnish – configured automatically depending on whether your host uses Varnish (Cloudways, Flywheel, WP Engine). Otherwise if they don’t use Varnish, this will be disabled automatically.

Cloudflare – enable if using Cloudflare.

Synchronize Sucuri Cache – enable if using Sucuri. This automatically clears Sucuri’s cache whenever you clear WP Rocket’s cache which helps keep your content synchronized. For the Sucuri Firewall API Key (For Plugin), login to Sucuri here, select your website, go to the API tab, then copy your API Key (For Plugin) and paste in WP Rocket when you expand the Sucuri field.

 

11. Cloudflare

This section is only if you’re using Cloudflare instead of RocketCDN or another CDN.

Cloudflare-Bandwidth-Savings

Sign up for Cloudflare and you will come to a page where they assign you 2 nameservers.

Cloudflare-GoDaddy-Nameservers

Change nameservers in your domain registrar to the one’s Cloudflare gave you.

SiteGround-DNS-Records

Add your Cloudflare information to WP Rocket.

WP-Rocket-Cloudflare-Add-On

Global API Key and Zone ID are found in your Cloudflare dashboard.

Cloudflare Global API Key

  • Global API Key – found in your Cloudflare dashboard.
  • Account Email – same email you used to sign up for Cloudflare.
  • Zone ID – found in your Cloudflare dashboard.
  • Domain – your website’s domain name.
  • Development Mode – use when making a lot of code changes to your site.
  • Optimal Settings – activates optimal Cloudflare settings: minification, aggressive caching, and deactivates Rocket Loader for better compatibility. Most common issue is Rocket Loader, but I also noticed it turns on email decoding which made my GTmetrix report worse, so I don’t use this (and instead configured Cloudflare in their dashboard).
  • Relative Protocol – sometimes if people download files from your site, there are no contents in them. Leaving this option OFF will prevent this from happening.
  • Clear All Cloudflare Cache Files – do this after you’re done configuring WP Rocket.

Configure Cloudflare Settings In The Dashboard – a lot of people have been asking about Cloudflare’s dashboard and how to configure it. Here are the things I recommend you do.

Page Rule 1: Cache Everything And Force HTTPS – cache your website aggressively.

http://*yourwebsite.com/*

Always-Use-HTTPS-Page-Rule

Page Rule 2: Secure The WordPress Admin And Bypass Cache – sets security level of the admin to high and bypasses Cloudflare’s cache in the admin, since you don’t want CDNs (or apps + performance features like Rocket Loader) running inside the admin.

yourwebsite.com/wp-admin*

WordPress-Admin-Page-Rule

Page Rule 3: Decrease Bandwidth Of WP Uploads – since the content in your WP Uploads folder does not change frequently, increasing Edge Cache TTL to a month can save on bandwidth, since the WP Uploads folder cache won’t be refreshed as often.

yourwebsite.com/wp-content/uploads*

WP-Uploads-Page-Rule

As I mentioned, Cloudflare won’t fix “content delivery network” in GTmetrix YSlow because of the way it’s set up. Instead, use the Claire Chrome Extension to ensure Cloudflare is working.

 

12. Image Optimization

WP Rocket recommends Imagify because it’s their plugin.

But even when you select lossless compression, it’s definitely not lossless and neither is ShortPixel. I used both for many months and switched to TinyPNG which I’m very happy with. The only thing about TinyPNG is that it doesn’t support WebP in which case you will need a plugin like WebP Converter For Media. But I find the quality is much better than with Imagify.

WP-Rocket-Image-Optimization

 

13. Tools

Import and export your WP Rocket settings, or rollback to the previous version of WP Rocket.

WP-Rocket-Tools-2020

Export Settings – export your settings to use on multiple sites.

Import Settings – import your pre-configured settings here.

Rollback – if you update to a new version of WP Rocket and it causes issues, this will fall back to the previous version.

Enable Google Font Optimization – combines fonts into 1 single file, ensures text remains visible while loading fonts, and preconnects fonts (tells browsers you intend to load Google Fonts). Remember to prefetch and preload fonts in the Preload tab and be minimal number of fonts, weights, and Elementor font icons. All these have an impact on your font’s load times.

 

WP Rocket = #1 Rated Cache Plugin

WP Rocket comes with many features most cache plugins don’t (see below). That means if you were to use other cache plugins, you would need to install about 6 extra plugins to get those features when WP Rocket already has them built-in (more features, yet less plugins on your site). That’s also why WP Rocket yields better results in GTmetrix/Pingdom and is what I use.

WP Rocket incorporates:

  • 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)
  • Integration with Cloudflare + other CDNs (built-in to WP Rocket, or use CDN Enabler)

I tested WP Rocket against 3 top free cache plugins and while they all do a great job, WP Rocket gave me the best results in Pingdom (.4s load times). Your cache plugin and hosting are 2 main speed factors so it’s definitely worth the $49. Configuring the right WP Rocket settings with Cloudflare + StackPath can fix over 20 items in Pingdom and GTmetrix. So let’s do that :)

The WP Rocket settings are WAY easier to configure than W3 Total Cache and they update the changelog regularly so you’ll actually get ongoing updates. If you have questions (or want to share your new load time), drop me a comment. WP Rocket also has documentation which I reference throughout the guide. Good luck – remember to benchmark those Pingdom scores!

Here are the Facebook polls:

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

I tested WP Rocket, WP Fastest Cache, and W3 Total Cache… making sure all cache plugin settings were configured optimally. WP Rocket won BUT this with the lazy load feature turned ON. The other cache plugins do not have a lazy load option and when I turned lazy load off in WP Rocket, I got a .5s load time… the exact same as WP Fastest Cache. I didn’t see a huge difference when clicking through my pages – both loaded super quickly. I know Pingdom can show different load times during different tests, but I just wanted to share my own experience.

WP Rocket (.406)
Pingdom Page Speed Test

WP Fastest Cache (.527)
WP Fastest Cache Load Times

W3 Total Cache (.619)
W3 Total Cache Load Times

 

Recommended Host: Cloudways

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

 

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.

 

View My Full WordPress Speed Guide

Here’s my full WordPress speed guide, or watch my video. It’s a 42 minute video but I cover pretty much everything (timestamps in video description) and you will learn lots of good stuff.

 

FAQs / Documentation

I spent many hours digging through their documentation to make sure this tutorial uses the best WP Rocket settings, but they are still extremely helpful if you haven’t checked them out.

wp rocket documentation

There are also video tutorials in the Tutorials tab to help configure your WP Rocket settings.

wp rocket video tutorials

Tutorials I found the most helpful:

🚀 What's the best way to configure WP Rocket?

The most important steps are to enable everything you can in the file optimization tab, setup RocketCDN or Cloudflare, disable WordPress heartbeat, and activate any services you're using in the Add-Ons tab.

🚀 How do I add a CDN with WP Rocket?

If using RocketCDN (powered by StackPath), sign up through the prompt in WP Rocket. If using Cloudflare, you will change nameservers. If using an external CDN like StackPath or KeyCDN, you will copy/paste your CDN URL into WP Rocket.

🚀 Why was WP Rocket rated #1 in most Facebook polls?

It comes with many features other cache plugins don't have: database cleanup, heartbeat control, option for multiple CDNs, lazy loading, local Analytics, Facebook Pixel browser caching, and more. That's why WP Rocket usually yields the best results in GTmetrix.

🚀 Which image optimization plugin works best with WP Rocket?

Even though they recommend Imagify which is owned by WP Rocket, I use ShortPixel because I see virtually no quality loss and still get 100% for Optimize Images in GTmetrix.

🚀 What other speed optimization plugins do you need besides WP Rocket?

You still need an image optimization plugin like ShortPixel, font optimization (eg. OMGF), and I also recommend using Asset CleanUp or Perfmatters to selectively disable plugins.

 

Get Help From My WordPress Speed Optimizer

Still need help with your GTmetrix report?

I’ve been working with Pronaya for 7 years (he’s the one who optimized my GTmetrix report). You can hire him by signing up for freelancer.com and searching for username bdkamol. Here is his full WordPress speed portfolio. He’s $40/hour from Bangladesh (so there is a time change) and you can email him at bdkamol@gmail.com. He also has a perfect 5 star review on his Freelancer profile. Serious inquiries only, and please don’t expect 100% scores if you’re using slow hosting, a bloated theme, and tons of heavy plugins. Please follow my speed guides first.

Pronaya-Kumar-S-Reviews

Here are some reviews on his profile:

BDkamol-WordPress-Speed-Reviews

So… how are those GTmetrix scores looking? Let me know in the comments!

See Also: How I Got 100% Scores In GTmetrix

If you found this tutorial helpful, a share is always appreciated :)

Cheers,
Tom

The Ideal WP Super Cache Settings With Cloudflare/StackPath CDN

WP Super Cache is a solid cache plugin (if you’re going the free route).

Otherwise WP Rocket was rated #1 in 7 Facebook polls and is what I use (I have a set up guide for WP Rocket as well). But WP Super Cache is still a great choice especially because… it’s free.

I will show you how to set up the WP Super Cache settings including the Advanced, CDN, and Plugin tab. I’ll also cover Cloudflare, StackPath, and show you the difference between the two.

If you’re using an NGINX server, you will need to edit the configuration file to make full use of WP Super Cache, especially to use the disk-base cache. If you do not feel comfortable doing this, I recommend trying a different cache plugin (WP Rocket, WP Fastest Cache, or even W3 Total Cache), as these cache plugins do not require you to edit your NGINX configuration file.

And for hosting, I highly recommend Cloudways DO who are miles better (and much faster) than shared hosting companies including SiteGround, WP Engine, GoDaddy and EIG brands.

WP-Super-Cache-Facebook-Poll

Here’s how to configure the WP Super Cache settings:

WP-Super-Cache-Tabs

 

1. Easy

wp super cache - easy settings

Caching (Enable) – enables caching, an easy way to improve load times.

Delete cache – if you make updates to your website, especially to CSS or JavaScript files, and you see an old version of your page, deleting cache will refresh the page to the newest version.

 

2. Advanced

wp super cache - advanced.1

wp super cache - advanced.2

wp super cache - advanced.3

wp super cache - advanced, expiry time

wp super cache - advanced, garbage collection

wp super cache - advanced, filenames and exclusions

wp super cache - advanced, filenames and exclusions.2

wp super cache - advanced, lockdown

 

Caching (Enable) – enables caching.

Cache delivery method – simple mode is easiest and is recommended for non-programmers. Expert Mode uses Apache’s mod_rewrite feature to serve “supercached” static html files and is faster than simple mode… but if you’re uncomfortable editing PHP files, use simple mode.

Don’t cache pages for known users (Enable) –  enabling this doesn’t show cached pages for people who have been on your website before. This is good because regular visitors want to see new content (eg. in your blogroll) that otherwise wouldn’t show up if you disable this.

Don’t cache pages with GET parameters. (?x=y at the end of a url) (Enable)doesn’t cache pages that are different for each user (unique sales pages if you run Facebook/Google ads, membership profiles, conditional logic on contact forms). GET Params is a great plugin for this.

Compress pages so they’re served more quickly to visitors (Enable) – this is the “Gzip Compression” item in GTmetrix/Pingdom. After enable this, view your homepage and look for noticeable formatting errors. If there are any, disable it. Otherwise, definitely enable this.

Cache HTTP headers with page content (Disable) – makes cached pages faster, but also makes WP Super Cache use PHP file delivery (slower) instead of static file delivery (faster). It’s a trade-off, but if you use plugins that send extra headers, enable it. Otherwise, disable it.

Cache rebuild. Serve a supercache file to anonymous users while a new file is being generated (Enable) – shows the cached page if a new file is in the process of being generated.

304 not modified browser caching. Indicate when a page has not been modified since it was last requested. (Enable) – prevents updating the cache on ‘tag’ pages (saves server resources).

Make known users anonymous so they’re served supercached static files – counters the earlier setting “don’t cache pages for known users” and instead, it caches for everyone.

Enable dynamic caching – (Enable) – enables caching for dynamic content (content that is changing) like ads, a publicly displayed visitor count, or even Amazon’s recommendations.

Mobile device support. (External plugin or theme required. See the FAQ for further details.) (Enable) – if using mobile plugin like WPtouch, or a mobile theme, this caches mobile pages.

Remove UTF8/blog charset support from .htaccess file. Only necessary if you see odd characters or punctuation looks incorrect. Requires rewrite rules update – (Disable) – if you see weird characters on your website (Â â €™ ¢), this should fix it. Otherwise, leave it disabled.

Clear all cache files when a post or page is published or updated – Enable) – if you publish a post, and you also have a blogroll (eg. on your homepage) and want to make sure it’s updated with the newest post, this will clear the cache and make sure the new content is being shown.

Extra homepage checks. (Very occasionally stops homepage caching) (Enable) – similar to the previous setting, this makes sure your newest blog posts are being shown on the homepage (if you have a blogroll). This is also applicable to dynamic content on the homepage.

Only refresh current page when comments made – enable this if you have lots of comments, as readers want to see the latest content (you don’t want to refresh all the cache to do this).

List the newest cached pages on this page (Disable) – shows which pages have been cached.

Coarse file locking. You do not need this as it will slow down your website  (Disable).

Late init. Display cached files after WordPress has loaded (Enable) – allows content to stay dynamic. If you see the error “super cache dynamic page detected but late init not set” fixes it.

Cache location – Don’t Change – don’t change the path, the default path is fine.

Cache Timeout – 3,600 is good for most websites, high traffic websites can lower this to 1,800. This is the frequency cached pages expire and will be thrown away. If you set it too slow, users will never see cached version. If too fast, it can consume lots of server resources.

Accepted filenames & rejected URIs – specify pages you don’t want to be cached. The most common use for this is excluding eCommerce pages or pages that are updated very frequently.

Examples:

  • /shop/
  • /shop/account/
  • /shop/checkout/
  • /shop/cart/
  • /shop/confirm-order/

Rejected user agents – prevents user agents from caching pages. The most common ones are search engines like Googlebot and Bingbot, but here is a complete list of user agents you can view. If using WPtouch, you will also want to add their entire list of mobile user agents here.

Lock down – prepares your server for an expected spike in traffic (during lock down, new comments on a post will not refresh the cached static files). This will save on server resources and help prevent your site from crashing. Only enable this if you notice traffic skyrocketing.

Fix configuration – restores the default WP Super Cache settings.

 

3. CDN

A CDN (content delivery network) hosts your heavy website files on multiple data centers around the country/world, which reduces the geographic distance between your server and visitor. This reduces load times and is recommended in the WordPress optimization guide.

StackPath is one of the most popular CDNs and is what I use on my site . They have 45 data centers heavily located in the US and amazing support who helped improve my GTmetrix YSlow score by 8%. KeyCDN is also good, but I’ve been very happy with MaxCDN/StackPath.

StackPath vs. Cloudflare – Cloudflare is free, StackPath starts at $10/month with a free 30-day trial. Cloudflare has it’s own data centers, StackPath has their own data centers. Generally the more data centers, the better, and the more resources you can offload to them (making your site load even faster). StackPath comes with a support team who will help you configure it (there is no support with Cloudflare’s free plan). StackPath support was able to significantly improve load times and improve my GTmetrix YSlow score by 8%, which was totally worth it.

Step 1: Sign up for a 30-day trial, then use the steps below. (StackPath also has a tutorial).

Step 2: In the StackPath dashboard, click the CDN tab, and create a StackPath CDN Site

StackPath-CDN-Tab

StackPath-CDN-Domain

StackPath-Server-IP-Address

Copy your server IP address – it is needed in step 6 of this section.

WP-Super-Cache-StackPath-CDN-URL

Step 3: Paste your CDN URL in WP Super Cache’s CDN tab under “Off-Site URL” and “Additional CNAMES.” If using SSL, also check “skip https URLs to avoid mixed content” errors.

wp super cache - cdn settings

wp super cache - enable cdn

Step 4: In StackPath go to CDN → Cache Settings, then click “Purge Everything”…

StackPath-Purge-Cache

Step 5: Copy your server’s IP address from step 2 (you can also find it in your hosting account). Then whitelist your server IP address in StackPath by creating a WAF site (WAF → Firewall).

StackPath-Whitelist-IP

Step 6: Run your site in GTmetrix and “content delivery network” should be green in YSlow.

CDN GTmetrix YSlow

Be sure to contact StackPath’s support as they were able to tweak my settings to further improve grades. They have one of the greatest support teams – I would definitely utilize it.

 

4. Contents

As long as your “cache timeout” is set appropriately in the Advanced settings, your expired cached pages will be deleted and they won’t put stress on your server. When working on site, you may also be making changing to CSS/JS (eg. background images) and see a cached version (or you may not see that your CDN is working). In this case, deleting the cache should fix this.

WP-Super-Cache-Contents-Setting

Delete cache – refreshes the cache in case you see old cached versions of your pages.

 

5. Preload

Preload is a refresh when the cached pages are all cleared out and refreshed in one go. I would enable it since this improves both website/indexing speed. However, preload consumes a lot of server resources which puts stress on your server and can make your website slow. By default, it set to refresh preloaded cache files every 600 minutes. But you should increase this number if it’s putting stress on your server, especially if you’re on shared hosting. You can also leave it to 0 if you do not want static files to expire ever unless you manually refresh the cache.

WP-Super-Cache-Preload-Settings

 

6. Plugins

Leave everything as-is, unless you are using the Bad Behavior pluginWordPress MU Domain Mapping plugin, or WPtouch plugin, in which case you would enable compatibly for those.

WP-Super-Cache-Plugins-Settings

 

7. Debug

WP-Super-Cache-Dubug-Settings

 

Cloudflare

WP Super Cache does not have a direct way to set up Cloudflare, but this is very easy and I definitely recommend using Cloudflare’s free CDN. Many hosts (including SiteGround) have an option to activate Cloudflare in their cPanel with 1 click. This is by far the easiest method.

SiteGround-Cloudflare-Activation

If your host doesn’t have this option, follow the steps below…

1. Sign up for Cloudflare and you will be prompted to add your website then begin a scan.

cloudflare-begin-scan

2. Once the scan is complete, select the free plan, then Cloudflare will take you through a set of pages. You will eventually be taken to a page where Cloudflare assign you 2 name servers

Cloudflare-Name-Servers-Dashboard

3. Do a Google search for “how to change name servers on SiteGround” (only search for your host), then follow their instructions. You will be copying the 2 name servers provided by Cloudflare and pasting them into a custom name servers option in your hosting cPanel…

SiteGround-DNS-Records

4. Go to your Cloudflare speed settings and make sure Auto Minify and Rocket Loader are turned OFF, but SG Railgun is on.

Cloudflare-Speed-Tab

5. Cloudflare says “we recommend that you create a Page Rule to exclude the admin section of your website from Cloudflare’s performance features. Features such as Rocket Loader and Auto Minification may inadvertently break backend functions in your admin section.”

Add these 2 page rules in your page rules settings

Cloudflare-Page-Rule-WP-Admin

Cloudflare-Page-Rule-WP-Preview

6. Finally, go to your Cloudflare caching settings and purge individual files

Purge Individual Files Cloudflare

Done!

Watch My Video – it’s a 42 minute video, but I cover pretty much everything (timestamps in video description) and you should learn a ton of great information on WordPress site speed:

 

Cloudways (My Recommended Host)

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

🚀 Is WP Super Cache a good plugin?

It's usually not the top rated plugin in Facebook polls and I have personally gotten better results with WP Rocket and other cache plugins. Every website is different - you need to configure and compare the results of different cache plugins in GTmetrix one at a time.

🚀 How do you set up Cloudflare with WP Super Cache?

Sign up for a free Cloudflare account and change nameservers (in your domain registrar) to the ones Cloudflare provides you with.

🚀 Will multiple CDNs further improve speed?

In theory, yes. More CDNs = more data centers = faster delivery of your content and more offloading of resources which should lighten the load on your server. Cloudflare's CDN is sufficient for most websites, but if you're obsessed with speed, try StackPath or KeyCDN.

🚀 How does WP Super Cache compare with WP Rocket?

WP Rocket has more speed features than WP Super Cache (database cleanup, optimizing Google Fonts + Analytics, heartbeat control) and is easier to configure, but WP Rocket is also a premium plugin. If speed is very important, give WP Rocket a go.

🚀 What other speed plugins do I need besides WP Super Cache?

You will need a plugin for optimizing fonts (OMGF), database cleanup (WP-Optimize), Heartbeat Control, optimizing Google Analytics (CAOS), and selectively disabling plugins (Asset CleanUp or Perfmatters). These features are not built-in to WP Super Cahce.

See Also: How I Optimized My WordPress Site To Load In <1s (36+ Tips)

Did it work?

Let me know in the comments!

Cheers,
Tom