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

WooCommerce Speed Optimization

Have a slow WooCommerce site?

I’ll show you how to make it faster by fixing items in GTmetrix/Pingdom (the same tips I used to get 100% GTmetrix scores). I’ll also show you how to optimize WooCommerce cart fragments, styles, scripts, product images, databases, CDNs, and other tips shown in the table of contents.

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.

How To Speed Up A Slow WooCommerce Store

  1. Disable Cart Fragments
  2. Disable WooCommerce Styles
  3. Disable WooCommerce Scripts
  4. Clear Customer Sessions
  5. Clear WooCommerce Transients
  6. Disable The WordPress Heartbeat API
  7. Use A Lightweight WooCommerce Theme
  8. Resize Product Images To Smaller Dimensions
  9. Don’t Use Too Many Extensions
  10. Use A Better Cache Plugin
  11. Avoid Resource-Hungry Plugins
  12. Delete Unused Themes + Deactivated Plugins
  13. Compress Images With ShortPixel
  14. Clean Your WooCommerce Database
  15. Clean Your WordPress Backend With Clearfy
  16. Block Bad Bots
  17. Upgrade To PHP 7.2
  18. Combine Google Fonts
  19. Setup Cloudflare’s Free CDN
  20. Pinpoint The Problem With Query Monitor
  21. Ignore Google PageSpeed Insights (Use GTmetrix)
  22. Check CPU Usage And Server Response Times
  23. Avoid EIG Hosting + GoDaddy
  24. Use Fast Hosting That Can Support WooCommerce

 

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)
  • Host Google Fonts locally (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 (use Dr. Link Check)
  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. Essential Grid
  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. WP Disable 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.2

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

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

Join the WordPress Hosting and WordPress Speed Up Facebook Group to see what real, unbiased people are saying, since hosting is the #1 factor in the WordPress optimization guide.

I use SiteGround and have 200ms response times with 100% GTmetrix scores and .4s Pingdom load times. Do a hosting check, run your own tests, or click through my fast loading pages. They were rated the #1 host in 26 Facebook polls and are worlds better than EIG (Bluehost, HostGator), GoDaddy, and other hosts who pack too many people on the same server. There have been plenty of people who migrated and posted results on Facebook and Twitter. Tweet after tweet, post after post, poll after poll after poll, faster hosting will fix slow response times. They’re recommended by WordPress, do free migrations, and I use their semi-dedicated plan.

2019 Hosting Poll

2017-WordPress-Hosting-FB-Poll

Elementor Hosting Recommendations

July 2019 Hosting Recommendation

WordPress-Host-Poll-Aug-2018

Shared-Hosting-Poll-2017

2019-Hosting-Poll

Go-To-Hosting-Company

WordPress-Hosting-Poll-2017

Managed-Hosting-Poll

WooCommerce-Hosting-FB-Poll

2016-Web-Hosting-Poll

Best-WordPress-Hosting-Provider-Poll

Best-Web-Hosting-2019-Poll

WP Friendly Hosting Poll

2016-WordPress-Hosting-FB-Poll

Favorite Hosting For Elementor

2018 Hosting Recommendations

WordPress Hosting Poll Sept 2018.png

Managed-WordPress-Hosting-Poll-2017

2019-Hosts-Poll-1

Hosting-Poll-For-Speed

WordPress-Hosting-Poll-June-1

SiteGround-Recommendation

2014-Managed-WordPress-Hosting-FB-Poll

Best-Web-Hosting-Provider-Poll

Hosting-Poll-Feb-2019

Hosting-Recommendations-Poll

Bluehost vs SiteGround

WordPress Web Host Poll

People usually migrate because their speed technology can improve server response times by multiple seconds. Here are a few people who migrated to SiteGround and posted their results.

Switching To SiteGround

SiteGround Load Time Migration

Bluehost to SiteGround GTmetrix

HostGator To SiteGround

SiteGround GTmetrix

SiteGround Google PageSpeed Insights

100 Perfect Score On SiteGround

SiteGround Genesis

Speed Delivered By SiteGround

SiteGround GTmetrix Report

Reduced Load Times With SiteGround

New SiteGround Response Times

HostGator To SiteGround Migration

SiteGround Response Times On Joomla

Switched To SiteGround Hosting

SiteGround Rocket Imagify Combo

Joomla GTmetrix On SiteGround

SiteGround PageSpeed Insights

SiteGround On Joomla

SiteGround Reduced Load Times

SiteGround Speedy Hosting

New Pingdom Results On SiteGround

New SiteGround Response Time

SiteGround Response Time Improvement

Godaddy To SiteGround Migration

EIG-To-SiteGround

SiteGround-Migration

My GTmetrix report on their semi-dedicated GoGeek plan:

2019-GTmetrix-Report

OMM-On-SiteGround

I use SiteGround because…

  1. My GTmetrixPingdom reports speak for themselves
  2. My pages load instantly (click through them if you want)
  3. Fast speed technology (PHP 7.3, NGINX, SG Optimizer, Cloudflare)
  4. Recommended by Yoast, WordPress, Ivica from WordPress Speed Up
  5. Free Let’s Encrypt SSL, easy to use cPanel, and features for eCommerce
  6. WordPress support is unbeatable even without GoGeek’s priority support
  7. GrowBig comes with staging, more storage, and more server resources (scroll down to “we allocate the resources you need” and hover over the server tab)
  8. GoGeek comes with even more server resources, storage, priority support
  9. Free migrations, migrator plugin, and a 30-day money back guarantee
  10. Plenty of praise on Reddit, Facebook conversations, Twitter, TrustPilot
  11. Tons of praise on Facebook: #1, #2, #3, #4, #5, #6, #7#8, #9, #10#11
  12. Many people already migrated and posted results on Twitter: #1, #2, #3, #4, #5, #6#7, #8, #9, #10, #11, #12, #13, #14, #15, #16, #17, #18, #19, #20, #21, #22, #23, #24, #25, #26, #27, #28, #29, #30, #31, #32, #33, #34, #35, #36, #37

Affiliate Disclaimer – if you sign up for SiteGround using my affiliate link I will donate a chunk of the commission at no expense to you. Each year I donate $3k to GoFundMe campaigns (2018 was to feed the hungry in Denver, and 2017 was Hurricane Harvey). Your support helps and I really do appreciate it. I try to make my reviews unbiased and backed by evidence in the form of Facebook polls, tweets, and real conversations. If you don’t want to use it, here’s a non-affiliate link to SiteGround. Either way I truly believe they’re the best host and that your site will run faster/smoother… do your research on Google and Facebook groups and you’ll find most people say the same.

SiteGround has 3 plans:

SiteGround-Plans

Higher plans include more server resources (#1 factor in the WordPress optimization guide). Here’s the full comparison chart, but GrowBig gives you about 2x more server resources than StartUp, and GoGeek is semi-dedicated hosting which gives you even more. GrowBig and up comes with a free migration, staging, advanced caching, and ability to host multiple websites. GoGeek comes with priority support. Their cloud hosting is quite the price jump at $80/month.

You can see this on their features page:

SiteGround-Server-Resources-Comparison

You can decide for yourself.

Favorite-Web-Host

 

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 With Cloudflare + CDN Instructions Which Got Me 1.2s GTmetrix Load Times (2020, Latest Version 3.6.1)

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 (Heartbeat Control, plugins for hosting Google Fonts and Analytics locally, etc).

I will show you how to optimize fonts, the difference between CDNs (Cloudflare, RocketCDN, StackPath), configure Cloudflare settings and page rules, optimize third party requests using preload and prefetch, image optimization plugins, WebP images, and how to delete old plugin tables in your database which you can’t do with WP Rocket (we will use WP-Optimize for this).

I tried to make this tutorial as robust (and simple) as possible. But if you still need help configuring the WP Rocket settings, drop a comment with your questions or GTmetrix report.

  1. Dashboard
  2. Cache
  3. File Optimization
  4. Media
  5. Preload
  6. Advanced Rules
  7. Database
  8. CDN
  9. Heartbeat
  10. Add-Ons
  11. Cloudflare
  12. Image Optimization
  13. Tools

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, but you don’t need it if you’re using 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 lower 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

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.

Optimize Google Fonts – this compresses 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/preload fonts in the Preload tab and be minimal with fonts/weights.

Exclude CSS – if for some reason a minification option messes up your site layout, locate the problematic file and add it here. See WP Rocket’s article 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. “

JavaScript Files – same concept as CSS only with JavaScript files.

 

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.

Disable Emojis – emojis slow down your site. You can also disable them under Settings → Writing → Formatting, then 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

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, they have 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 – prevents 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

You should really just use Cloudflare’s free CDN, in which case you would change nameservers and don’t need to do anything in this tab (see the Cloudflare tab instead).

WP Rocket says you shouldn’t use RocketCDN on top of Cloudflare. And since WP Rocket uses StackPath’s data centers for RocketCDN (who only has around 32 data centers), you’re better off on Cloudflare who has 200 data centers and counting. More data centers = faster website.

WP Rocket’s CDN tab is only for setting up CDNs who use CDN URLs (StackPath, KeyCDN, BunnyCDN), it is not for Cloudflare (which requires changing nameservers and using the Cloudflare tab) or RocketCDN (requires signing up through WP Rocket).

That means there is nothing to do in WP Rocket’s CDN settings since CDN URLs don’t work with Cloudflare or RocketCDN (they’re specifically for StackPath, BunnyCDN, KeyCDN, etc).

Here’s the catch.

I’m using both Cloudflare and StackPath. Yeah, I’m going against advice not to use multiple CDNs, but it’s been working great and I’m offloading a ton of bandwidth to StackPath. While I don’t advise this and it’s not recommended by WP Rocket, it works for me. If you want to try this, sign up for StackPath, create a CDN site, then copy/paste your CDN URL into WP Rocket.

StackPath-Bandwidth-Savings

Grab your StackPath CDN URL:

StackPath-CDN-URL-WP-Rocket

Paste the CDN URL into WP Rocket:

WP-Rocket-CDN-Settings

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.

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

As mentioned earlier, Cloudflare is the only CDN you need which offloads a ton of bandwidth.

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-Settings

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 on the previous version.

 

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)
  • Host Google Fonts locally (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

In case you were wondering what hosting I use, it’s Cloudways DigitalOcean.

SiteGround-vs-Cloudways

Join the WordPress Hosting FB Group to see what real, unbiased people are saying. Look at Facebook polls and tweets of people who migrated and posted their server response times.

I signed up for 15+ different hosting plans and tested them with the identical website:

DigitalOcean On Cloudwayscwdoserver.com had the fastest load times, is who I use, and are very popular in Facebook Groups (especially as a SiteGround alternative). Cloudways does monthly pricing starting at $10/month with no high renewal prices or strict CPU limits like SiteGround. Their stack is very fast: PHP 7.4, Maria DB 10.3, Memcached, Varnish, Nginx, and Redis. Only complaint is their email hosting costs $1/month (you will need a Rackspace account). Their community manager is helpful and they do free migrations. Get 25% off your first 2 months with the code OMM25.

Kinstaknstaserver.com has similar speeds as DigitalOcean on Cloudways only they are more expensive starting at $30/month. Known for being capable of handling many concurrent visitors. People consistently recommend Kinsta in Facebook Groups, Twitter, and in migration results. Even though they’re not always #1 in Facebook polls (likely because not everyone can pay $30+/month), they are great for high traffic sites.

WPX Hostingwpxserver.com is also very quick, but Cloudways and Kinsta are slightly faster. Starts at $20-$25/month and is who Matthew Woodward recommends.

A2 Hostingatwoserver.com usually outperforms other shared hosting, but it’s not nearly as fast as cloud hosting (just cheaper). I use them for my girlfriend’s restaurant website and it’s decently fast with good uptimes. A2 (and all shared hosting) is only sufficient for smaller sites with lower traffic and plugins. Check this Facebook poll.

SiteGround – have gone downhill in my opinion and are no longer my recommended host. Load times and TTFB on stgrndserver.com were usually above 1s. Many complaints about their renewal prices, price hikes, CPU limits, and support isn’t as good as it used to be. SiteGround shifted to Google Cloud hosting (instead of shared) which is supposed to be faster, but they didn’t perform well. Their SG Optimizer plugin will help, but I still wouldn’t use them. You will be much better off on CW DigitalOcean.

Affiliate Disclaimer – I would seriously appreciate you using my affiliate links which means I earn a commission at no expense to you. This would help me make GoFundMe donations ($6,000 so far)! I try to base my recommendations on tests, Facebook polls, and conversations I see on a daily basis in the 30+ WP Facebook Groups I’m active on.

I would personally skip shared hosting since cloud hosting is exponentially faster. This is especially true if you’re on GoDaddy or EIG brands (eg. Bluehost and HostGator) and for resource-intensive websites running WooCommerce, WPML, page builders, or slow plugins.

There are plenty of migration results if you check Twitter and Facebook Groups. Avoid the bloggers promoting Bluehost and WP Engine because they have the highest commissions and do your research. Hosting is the #1 factor in WordPress’ optimization guide – very important!

Cloudways Response Times

Godaddy to DigitalOcean Migration

VPS Cloud Hosting WooCommerce Poll

Hosting Recommendations Facebook

2017-WordPress-Hosting-FB-Poll

2018 Hosting Recommendations

Favorite Hosting For Elementor

Untitled

Vultr Migration

WordPress Hosting Suggestions

VPS Cloud Hosting Poll

2016-WordPress-Hosting-FB-Poll

July 2019 Hosting Recommendation

Elementor Hosting Recommendations

 

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, set up CDNs like Cloudflare + StackPath, 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 Cloudflare, you will simply change nameservers. If using an external CDN like StackPath or KeyCDN, you will copy/paste your CDN URL into WP Rocket. If using RocketCDN (powered by StackPath), sign up through the prompt in 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

How To Fix Bluehost’s Slow WordPress Hosting (Using GTmetrix, PHP 7.3, Cloudflare’s CDN, Cache Plugins, And Optimizing Images)

Have a slow WordPress site on Bluehost?

The easiest way to fix a slow WordPress site on Bluehost is by upgrading to PHP 7.3, removing slow plugins, using a solid cache plugin, Cloudflare’s CDN, and optimizing images to load faster.

There’s an easy way to tell if Bluehost is the problem: run your site through Google PageSpeed Insights to see if reduce server response time is in your report (Google recommends <200ms). If you have a high server response time or TTFB in GTmetrix, then your Bluehost server is slow.

A warning about Bluehost: Bluehost is not fast and mainly promoted by bloggers who want affiliate commissions. I set up an identical Astra website on blhstserver.com and cwdoserver.com. One is hosted on Bluehost, one is hosted on Cloudways DigitalOcean who was rated the #1 host in Facebook polls, conversations, and migration results. Visit the websites and click through their pages – you will see the difference in speed.

Benchmark your scores + load times in GTmetrix and post them in the comments! If you need help, leave your GTmetrix report in the comments and I’ll provide you with some suggestions.

How To Fix A Slow WordPress Site On Bluehost

  1. Check Your Website’s Server Response Time
  2. Upgrade To PHP 7.3 In Bluehost’s cPanel
  3. Activate Cloudflare’s CDN
  4. Configure A Solid Cache Plugin
  5. Make Images Load Faster
  6. Remove Slow Loading Plugins
  7. Remove Junk From Your WordPress Database
  8. Optimize Google Fonts
  9. Optimize Third Party Scripts
  10. Remove Bloat From WordPress
  11. Retest Your GTmetrix Scores
  12. Consider Moving To Cloudways

When you’re done, hopefully your GTmetrix report looks more like this:

1s-2020-GTmetrix-Report

This video should also help (timestamps are in the video description):

 

1. Check Your Website’s Server Response Time

Run your site through Google PageSpeed Insights to see if reduce server response time is in your report. If yes, this means your server (on Bluehost) is slow. A high number of websites on Bluehost have a slow server especially since Google recommends it should be under 200ms.

The only way to fix this is by lowering the amount of CPU consumed by your website (eg. deleting high resource plugins in GTmetrix’s Waterfall tab). Or upgrade your hosting to include more server resources (either with Bluehost or someone else) – but this is the #1 speed factor.

Reduce Server Response Time

Indicators Bluehost Is Slow

  • High server response time in PageSpeed Insights (over 200ms)
  • High TTFB (time to first byte) in GTmetrix Timings tab (over 200ms)
  • High PageSpeed + YSlow scores in GTmetrix, but load time is still slow
  • 503 service unavailable errors; this means the server is being overloaded

You may also want to read Bluehost’s resource usage section on their user agreement page. It says “Accounts with a large number of files (inode count in excess of 200,000) can have an adverse effect on server performance.” This means if your site is consuming lots of resources (from more traffic, slow plugins, etc), they throttle your bandwidth and slow down your site. Bluehost customers constantly complain about slow servers on Twitter and Bluehost forums.

Join Facebook Groups and do your research.

Bluehost-Managed-WordPress-Hosting

 

2. Upgrade To PHP 7.3 In Bluehost’s cPanel

Most WordPress users are running outdated PHP versions when upgrading can easily make your site 2-3x faster. Bluehost will not upgrade you automatically (because they don’t want to risk breaking your site) so you need to do this yourself as Bluehost releases new PHP versions.

How To Update PHP Version On Bluehost

  • Login to your Bluehost cPanel
  • Select the PHP Config option
  • Select PHP 7.3 and save changes

Bluehost PHP 7.3 1

 

3. Activate Cloudflare’s CDN

To add Cloudflare, login to Bluehost and go to Domains → Cloudflare → Activate.

Bluehost-Cloudflare

Bluehost Cloudflare

This activates Cloudflare’s CDN (content delivery network) which hosts your website on 200+ data centers around the world, reducing the distance between your server and visitors. It also helps offload resources to their data centers (lightening the load on your server) while improving security. Registering your site on the actual Cloudflare website, logging into your Cloudflare dashboard, and configuring the speed tab and page rules can further improve speed.

 

4. Configure A Solid Cache Plugin

WP Rocket was the #1 rated cache plugin, costs $49 and is what I use on my site. WP Fastest Cache was the top rated free cache plugin and is super easy to set up. Both can shave multiple seconds off your load time and I wrote tutorials for both, plus W3 Total Cache and WP Super Cache. Only use 1 caching plugin on your site – I recommend WP Rocket or WP Fastest Cache.

WP Rocket is better because it has more speed optimization features than other cache plugins, otherwise you would need to install the following plugins to get these (different cache plugins have different features, so only install them if your cache plugin doesn’t have a built-in feature).

  • 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)
  • Host Google Fonts locally (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

A glimpse of the WP Rocket settings (file optimization are the most important settings):

WP-Rocket-File-Optimization-Settings

Here’s a glimpse of the WP Fastest Cache settings:

WP-Fastest-Cache-Settings

 

5. Make Images Load Faster

There are a few primary ways to optimize your images; some are found in GTmetrix, others are found in Google PageSpeed Insights. All of them will contribute to better scores and load times.

Serve Scaled Images – means images are too large and need to be resized. When expanded, GTmetrix tells you which images have errors and their correct dimensions. Your logo, sliders, blog, and any image on your website usually calls for specific dimensions which you should be resizing them too. Start with images that appear on multiple pages (eg. logo + sidebar images). It’s a good idea to create a cheat sheet of your image dimensions so you can resize images accordingly (content body width, widget width, sliders, featured images, carousel images, etc). This way you or your designer can crop/resize images before uploading them to WordPress.

image-optimization

serve-scaled-images

Specify Image Dimensions – means you need to specify a width and height in the image’s HTML or CSS. The WordPress visual editor should take care of this automatically, however you usually need to do this manually with images that are hand-coded in HTML or CSS. Expand the “specify image dimensions” item in your GTmetrix PageSpeed report and they tell you the width/height.

specify-image-dimensions

Specifying Image Dimensions In HTML:
<img src=”/wp-content/uploads/2019/10/example-image.jpg” alt=”Example Image” width=”360″ height=”180″ />

Specifying Image Dimensions In CSS:
logo width: 180px (retina: 360px;)
logo height: 110px max (retina: 220px;)

Losslessly Compress Images – this is the “optimize images” item in GTmetrix. It means you need to compress images using a plugin like ShortPixel (what I use), Imagify, or Smush. Set your compression level in the plugin settings and test a few images before bulk optimizing them, since you may see a slight reduction in quality. Most are free until you reach the monthly quota.

Imagify-Optimize-Images-On-Upload

Lazy Load Images – can be done using WP Rocket and most image optimization plugins. This delays the loading of images until users scroll down the page and visibly see images. Can also be done for videos, including replacing YouTube iframes with preview images (seen in WP Rocket).

Serve Images In Next-Gen Format – this is an item in PageSpeed Insights. It means you need to use image formats like WebP instead of JPEG and PNG. Most image optimization plugins will convert images to WebP format for you, or if you’re using SVGs, use the SVG Support plugin.

 

6. Remove Slow Loading PLugins

Find Your Slowest Plugins – look through your GTmetrix report (especially the Waterfall tab) to find which plugins are causing issues with your load times. Delete or replace them if possible.

Slow WordPress Plugin

Avoid Slow Plugins – avoid these 65+ infamously slow plugins.

  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 (use Dr. Link Check)
  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. Essential Grid
  15. View Full List Of 65 Slow Plugins

Minimize Plugins – deactivate and delete any plugins you don’t absolutely need.

Consolidate Plugins – use 1 plugin for multiple features, for example, use WP Rocket for nearly all speed optimizations instead of individual plugins like WP-Optimize or Heartbeat Control.

Selectively Disable Plugins From Specific Pages – use Perfmatters or Asset CleanUp to disable plugins from running on specific pages/posts. If you only use your contact form plugin on the contact page, disable everywhere else. Or if you have social sharing buttons on your blog, disable them on pages. Seeing which scripts/plugins are loading on your pages is an eye opener.

perfmatters-script-manager

 

7. Remove Junk From Your WordPress Database

If you’re using WP Rocket for your cache plugin, you can skip this step since there’s an option to do this in the WP Rocket “database” settings. Otherwise WP-Optimize does the same thing… it cleans your database like your spam and trash folder, pingbacks, trackbacks, and potentially thousands of post revisions. Schedule a database cleanup every 2 weeks or so to keep it clean.

WP-Optimize Clean Database

WP-Optimize lets you delete tables left behind by old plugins which aren’t installed anymore.

WP-Optimize-Tables

 

8. Optimize Google Fonts

See font-related errors in your GTmetrix report?

Try installing and configuring the OMGF plugin. It automatically downloads your fonts and creates a stylesheet for them, so that they’re included in your site’s header which makes them easier to optimize. You can also try hosting fonts locally yourself. Elementor Pro also has custom font options for hosting them locally. Especially if you’re using an external font like Google Fonts or Font Awesome, make sure you are minimal with the number of fonts/weights.

Google-Fonts-GTmetrix

OMGF will automatically create the stylesheet for you:

OMGF-Generate-Stylesheet

 

9. Optimize Third Party Scripts

Third Party Scripts are anything “embedded” on your website from an external website.

This is anything from embedded videos to Google Fonts, Analytics, AdSense, Tag Manager, Maps, or even social sharing buttons on your blog. You can usually find these in the “reduce DNS lookups” section of your GTmetrix report. These all generate extra requests from outside websites and will slow down yours. While some can be optimized, others cannot.

  • Embedded Videos – Lazy load videos and replace the YouTube iframe with a preview images (in WP Rocket) or use the WP YouTube Lyte plugin by the Autoptimize team.
  • Embedded Social Media Posts – try taking a picture of the post and using that instead.
  • Google Analytics – try hosting your Google Analytics tracking code locally. This should fix the “leverage browser caching” issue for Google Analytics in your GTmetrix report, but don’t worry if you can’t fix this since it shouldn’t even impact your actual load times.
  • Google AdSense – a GTmetrix killer, I highly recommend just doing affiliate marketing.
  • Google Maps – only use a Google Map on the contact or pages optimized for local SEO.
  • Google Tag Manager – usually only benefits load times for large, unoptimized websites.

WordPress External Scripts

 

10. Remove Bloat From WordPress

By default, WordPress consumes resources with autosaves, post revisions, pingbacks, trackbacks, heartbeat API, jQuery migrate, and many other things you probably don’t need.

I use the Perfmatters plugin by Kinsta to disable these (I was using WP Disable but it has bad reviews and can cause errors on your site). Perfmatters is the only plugin that not only lets you disable the crap, but also has a script manager for selectively disabling plugins (the previous step) as well as hosting Google Analytics locally. It’s what I personally use on my own website.

perfmatters-settings

 

11. Retest Your GTmetrix Scores

Rerun your site through GTmetrix and you should see a significant improvement in scores/load time. If not, this probably means you’re on Bluehost’s cheapest $6.99/month plan and you’re getting what you pay for. Any serious website should not be on such a cheap plan especially if it’s a business website and you rely on it to make a living. Let me know your new page load time in the comments! Or send me your GTmetrix + Pingdom report and I’ll send a few suggestions.

Other Optimizations:

  • Use A Lightweight theme and use fast page builder (Oxygen)
  • For WooCommerce, optimize scripts, styles, and cart fragments in Perfmatters
  • Minimize redirects by using the correct HTTP(S) and WWW version of your site

1s-2020-GTmetrix-Report

 

12. Consider Moving To Cloudways

Switching from Bluehost to DigitalOcean on Cloudways is night and day.

I signed up for 15+ hosting accounts to test their speed. All domains in this video are live, which means you can visit them in real-time and click through their pages, use GTmetrix, etc.

Each website is identical except for it’s hosting (same Astra Starter Site, SSL, no caching, no CDN, and the same 6 plugins). I also used WP Hosting Performance Check and KeyCDN to measure the most popular options. The results align with what most people are saying in the WordPress Hosting Facebook Group which I recommend joining to get real, unbiased opinions.

I moved from SiteGround to DigitalOcean on Cloudways and the results speak for themselves. I’m also paying 1/2 of what I was. Cloudways also does free migrations which made it very easy.

SiteGround-vs-Cloudways

#1. DigitalOcean On Cloudwayscwdoserver.com was the fastest, is who I use, and are very popular in Facebook Groups (especially as an alternative to SiteGround). DigitalOcean is also the only host mentioned in the WordPress Optimization Guide. Cloudways was #1 in most recent Facebook polls and people who migrate usually see significant load time improvements. They use PHP 7.4, Maria DB 10.3, Memcached, Varnish, Nginx, and Redis. Pricing starts at $10/month with no strict CPU limits or renewal prices like on other hosts. The community manager is very helpful and they do free migrations. You can get 25% off your first 2 months with the promo code OMM25.

#2. Kinstaknstaserver.com had similar speeds as DigitalOcean on Cloudways only they are more expensive starting at $30/month. Known for being capable of handling many concurrent visitors. People consistently recommend Kinsta in Facebook Groups, Twitter, and in migration results. Even though they’re not always #1 in Facebook polls (likely because not everyone can pay $30+/month), they are great for high traffic sites.

#3. WPX Hostingwpxserver.com is also very quick, but Cloudways and Kinsta are slightly faster. Starts at $20-$25/month and is who Matthew Woodward recommends.

#4. A2 Hostingatwoserver.com usually outperformed other shared hosting but is not nearly as fast as cloud hosting (just cheaper). I use A2 for my girlfriend’s restaurant website and it’s decently fast with good uptimes. A2 (and all shared hosting) is only sufficient for smaller websites with low traffic/plugins. Otherwise, use cloud hosting.

#5. SiteGround – has gone downhill with many complaints about their renewal prices, price hikes, CPU limits, and support isn’t as good as it used to be. SiteGround shifted to Google Cloud hosting (instead of shared) which is supposed to be faster, but load times and TTFB on stgrndserver.com were usually above 1s. Their SG Optimizer plugin should help, but I still wouldn’t use them. You’re better off on Cloudways DigitalOcean.

Affiliate Disclaimer – I would seriously appreciate you using my affiliate links which means I earn a commission at no expense to you. This would help me make GoFundMe donations ($6,000 so far)! I try to base my recommendations on tests, Facebook polls, and conversations I see on a daily basis in the 30+ WP Facebook Groups I’m active on.

I would personally skip shared hosting since cloud hosting is exponentially faster. This is especially true if you’re on GoDaddy or EIG brands (eg. Bluehost and HostGator) and for resource-intensive websites running WooCommerce, WPML, page builders, or slow plugins.

There are plenty of migration results if you check Twitter and Facebook Groups. Avoid the bloggers promoting Bluehost and WP Engine because they have the highest commissions and do your research. Hosting is the #1 factor in WordPress’ optimization guide – very important!

Cloudways Response Times

Godaddy to DigitalOcean Migration

VPS Cloud Hosting WooCommerce Poll

Hosting Recommendations Facebook

2017-WordPress-Hosting-FB-Poll

2018 Hosting Recommendations

Favorite Hosting For Elementor

Untitled

Vultr Migration

WordPress Hosting Suggestions

VPS Cloud Hosting Poll

2016-WordPress-Hosting-FB-Poll

July 2019 Hosting Recommendation

Elementor Hosting Recommendations

Cloudways Facebook Review

 

14. Frequently Asked Questions

🔵 Is Bluehost the problem?

If you have a high server response time in Google PageSpeed Insights, Bluehost may be the problem. Bluehost is owned by EIG who is infamous for overcrowding their servers.

🔵 What can I do to improve speed on Bluehost?

Upgrade to PHP 7.3 in your Bluehost cPanel, activate Cloudflare's CDN, use a good cache plugin like WP Rocket, configure it with optimal settings, and optimize images and plugins.

🔵 Will upgrading plans improve load times?

Yes, but you should optimize your website first and consider alternative hosts. Bluehost's Optimized WordPress Hosting or VPS plans aren't nearly as fast as semi-dedicated or cloud hosting from other providers. Join some Facebook Groups and do your research.

🔵 Which WordPress speed plugins should I use?

WP Rocket, TinyPNG, and Perfmatters are 3 key WordPress speed plugins. If you're not using WP Rocket, you will need to install additional plugins to take care of Heartbeat Control, database cleanup, lazy loading, and hosting Google Fonts and Analytics locally.

🔵 Which speed testing tools should I use?

GTmetrix has the most robust recommendations and is great for finding slow plugins and unoptimized images. Google PageSpeed Insights is primarily good for measuring server response times. Otherwise, follow the speed recommendations provided by GTmetrix.

🔵 Which plugins are slowing down my site?

Most slow WordPress plugins include social sharing, statistic (analytics) plugins, sliders, portfolios, page builders, calendars, chat, contact form, related post, sitemap, Wordfence, WPML, WooCommerce, and any plugin that runs ongoing scans or processes. Your slowest loading plugins can be found using Query Monitor or in your GTmetrix Waterfall report.

🔵 How can I optimize external scripts?

Some external scripts like Google Fonts and Analytics can be optimized by hosting them locally using the CAOS plugins. Disques also has a conditional load plugin, and YouTube videos can be lazy loaded. You can also try the Async JavaScript when loading JavaScript.

Other external scripts like Google AdSense, Facebook widgets, and high CPU plugins are nearly impossible to optimize and best to avoid all together.

Did this tutorial work?
Let me know in the comments and feel free to share your new load time! If you still have a slow WordPress site on Bluehost let me know about that too… I will gladly look into your GTmetrix + Pingdom report and send you a few suggestions (just please do what you can from this guide).

See Also: Cloudways Review

Cheers,
Tom

How To Fix HostGator’s Slow WordPress Hosting (Using PHP 7.3, CDNs, Cache Plugins, And A Variety Of Speed Optimization Plugins)

Have a slow WordPress site on HostGator?

If your WordPress site is slow on HostGator, you can speed it up by upgrading to PHP 7.3, configuring a cache plugin, using Cloudflare, and optimizing your images, database, and plugins.

To check if HostGator is the problem, run your site through Google PageSpeed Insights to see if reduce server response time is in your report. If yes, that means your HostGator server is slow. This wouldn’t be surprising considering how many people complain about HostGator’s servers.

HostGator is known for being cheap and were rated poorly in Facebook polls behind SiteGround and Cloudways who were consistently #1 (here’s just one person who migrated from HostGator and saw a 10s load time improvement). After all, HostGator is owned by EIG. Optimizing your site helps, but if your server response times are still slow, you know the issue.

A warning about HostGator: HostGator is one of the slowest hosts. I set up an identical Astra website on hstgtrserver.com and cwdoserver.com. One is hosted on HostGator’s Optimizes WordPress Hosting, one is hosted on Cloudways DigitalOcean who was rated the #1 host in Facebook polls, conversations, and migration results. Visit the websites and click through their pages – you will see the difference in speed.

Benchmark your scores + load times in GTmetrix and post them in the comments! And if you need help, leave your GTmetrix report in the comments and I’ll provide you with suggestions.

How To Fix A Slow Website On HostGator

  1. Check For Slow Server Response Times
  2. Upgrade To PHP 7.3 In HostGator
  3. Configure A Solid Cache Plugin
  4. Setup Cloudflare’s CDN
  5. Avoid Slow Loading Plugins
  6. Optimize Images
  7. Disable Unnecessary WordPress Features
  8. Clean Your Database
  9. Minimize Redirects
  10. Avoid External HTTP Requests
  11. Find Bottlenecks In GTmetrix
  12. Consider Moving To Cloudways

My goal is to make your GTmetrix report look more like this:

1s-2020-GTmetrix-Report

This video should help (timestamps are in the video description):

 

1. Check For Slow Server Response Times

Run your WordPress site through Google PageSpeed Insights to see if reduce server response time shows in the report (Google recommends 200ms). Servers are controlled by your hosting.

Reduce-Server-Response-Times

Another indicator is if your time to first byte (TTFB) is slow in the GTmetrix Timings tab. Good GTmetrix scores but slow server response times and TTFB indicates your hosting as the issue.

TTFB

Bottom line – you may be able to reduce this with these tips, but if not, you will either need to upgrade plans to include more server resources, or consider better hosting with faster servers.

 

2. Upgrade To PHP 7.3

Most WordPress users are running outdated PHP versions when upgrading can make your site 2-3x faster. HostGator will not upgrade you automatically (because they don’t want to risk breaking your site) so you need to do this yourself as HostGator releases new PHP versions.

HostGator’s Optimized WordPress Hosting does not have cPanel, so you cannot upgrade PHP versions yourself. You will need to contact support to have them do it.

WordPress PHP Benchmarks

Step 1: In your HostGator cPanel, go to Software → MultiPHP Manager.

Step 2: Upgrade to PHP 7.3.

Step 3: Check your website for errors. If you see any, you can always downgrade to the PHP version you were using previously. Errors are likely caused by themes/plugins that are not updated frequently by the developer, so make sure you’re using reliable plugins and themes.

Step 4: Keep your PHP updated to the latest version. HostGator does an OK job in releasing new versions, however other hosting companies already have a stable version of PHP 7.4.

Supported-PHP-Versions

 

3. Configure A Solid Cache Plugin

WP Rocket and WP Fastest Cache are usually rated highest in Facebook polls.

Many features are built-in to WP Rocket (database cleanup, heartbeat control, lazy load, etc) while WP Fastest Cache and other cache plugins don’t come with these features. In other words, WP Rocket lets you use 1 plugin for everything instead of having to install multiple plugins. That’s also why WP Rocket usually gives you better scores and load times in GTmetrix.

The following features are built-in WP Rocket. But if you’re using another cache plugin that doesn’t come with a specific feature, you’ll need to install these 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

WP Rocket (406ms)
Pingdom Page Speed Test

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

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

Here are tutorials for configuring the ideal WP Rocket and WP Fastest Cache Settings. I also have configuration tutorials for W3 Total Cache, WP Super Cache, and Autoptimize settings.

A glimpse of the WP Rocket settings (file optimization tab is the most important):

WP-Rocket-File-Optimization-Settings

HostGator does have an option to enable cache in the cPanel which you should leave disabled if you’re using a cache plugin. Cache plugins take care of many other optimizations other than caching (eg. minifying HTML, CSS, JS) and you will get much better results with a cache plugin.

HostGator Cache

 

4. Setup Cloudflare’s CDN

Cloudflare’s CDN hosts your website on 200+ centers and reduces the distance between your server and visitors. It also helps offload resources which can reduce your server response time.

1. Sign up for a free Cloudflare plan, add your website, and run the scan.

Add Site To Cloudflare

2. You will eventually come to a page where Cloudflare assigns you 2 nameservers.

3. HostGator says you will need to contact them to setup private nameservers.

Unfortunately you need private nameservers on HostGator to do this which is only available on their reseller account, VPS, and dedicated server. I have no idea why they do this. WP Rocket and W3 Total Cache have settings for Cloudflare – you can try setting it up through one of these (let me know if this works in the comments please!)

HostGator Private Nameservers

4. Once they do, find them and enter the nameservers provided by Cloudflare.

HostGator Nameservers

5. Go to your Cloudflare speed settings and use these:

Cloudflare-Speed-Tab

6. Go to Cloudflare’s caching settings and Purge Everything.

Cloudflare Purge

All done! It can take 24 hour for Cloudflare nameservers to propagate so be patient :)

5. Avoid Slow Loading Plugins

Thank you Ivica from the WordPress Speed Up Facebook Group for contributing to this list.

  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 (use Dr. Link Check)
  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. Essential Grid
  15. View Full List Of 65 Slow Plugins

Be sure to deactivate/delete all plugins you’re not currently using. If you only use a plugin at certain times, deactivate/delete it – then reinstall the plugin when needed.

Disable Plugins On Specific Pages/PostsPerfmatters and Asset CleanUp let you selectively disable plugins on specific pages/posts. For example, if you’re only using your contact form on the contact page, disable it everywhere else. Or if you only use social sharing buttons on the blog, disable it on all your pages. Going through your scripts/plugins, viewing their size, and disabling plugins where they’re not being used can significantly improve scores and load times.

perfmatters-script-manager

 

6. Optimize Images

There are 5 primary ways to make images load faster:

  • Serve scaled images: resizing large images to be smaller.
  • Losslessly compress images: compress images using a plugin.
  • Lazy load images: delays loading images until you scroll down the page.
  • Specify image dimensions: add a width/height to the image’s HTML or CSS.
  • Serve images in next-gen formats: convert images (eg. to WebP) format using a plugin.

Serve Scaled Images
Serve scaled images are found in GTmetrix where they tell you which images are too large and the dimensions they should be resized to. GTmetrix only shows unoptimized images for a single page. Resize them, reupload them, and replace the old images with the new ones. It’s best to resize images BEFORE uploading them, and to create an “image dimension cheat sheet” listing the dimensions of all your different image sections (logo, sliders, widgets, full width blog images, etc). Start by fixing images that appear on multiple pages (logo, sidebar, and footer images) then run your most important pages through GTmetrix and optimize individual images.

Serve Scaled Images

Losslessly Compress Images
This is the “optimize images” item in GTmetrix. I personally use ShortPixel but Imagify is also good. Install an image optimization plugin, set your compression level, and test a few images to make sure you are happy with their quality. Most plugins are free until you reach their limit.

ShortPixel-Image-Compression-Levels

Lazy Load Images
Lazy load delays the loading of photos, videos, and iframes so they only load once you scroll down the page and see them. Videos are heavy so I suggest at least doing that – I don’t lazy load photos since it can be annoying to load photos as you scroll down. WP Rocket has an option for this in the Media tab, otherwise you can use a plugin like A3 Lazy Load and WP YouTube Lyte.

WP-Rocket-Lazy-Load

Specify Image Dimensions
Specify image dimensions means you need to locate the image, view it’s HTML, and add a width and height in the HTML (which is provided by GTmetrix). Since the WordPress visual editor and most page builders do this automatically, it only usually happens in hand-coded HTML or CSS.

Specify-Image-Dimensions-WordPress

Serve Images In Next-Gen Formats
Found in PageSpeed Insights, WebP and SVG formats can have better quality and compression than JPEG and PNG. Depending on which format you choose, most image optimization plugins have an option to convert your images to WebP format or for SVG, use the SVG Support plugin.

 

7. Disable Unnecessary WordPress Features

The Perfmatters plugin lets you disable pingbacks, trackbacks, heartbeat, and limit autosave intervals and post revisions. It also lets you host Google Analytics locally and selectively disable plugins from specific pages/posts. The only other plugin I know that does this is WP Disable, Clearfy, and Asset CleanUp, but I have tested them and personally use Perfmatters on my site.

perfmatters-settings

 

8. Clean Your Database

You can do this in WP Rocket’s database tab (below), otherwise use the WP Optimize plugin. Backup your website if this is your first time doing it and schedule this for weekly or monthly.

WP-Rocket-Database-Settings

One thing I like about WP-Optimize is that it lets you delete old tables left behind by plugins you deleted (shown as “not installed”). If you don’t plan on using the plugin again, delete these.

WP-Optimize-Tables

 

9. Minimize Redirects

Usually means you changed the WWW or HTTP(S) version of your site, but your links/images are still using the old version. You need to correct ALL these which can be done in bulk using the Better Search Replace plugin. GTmetrix will only show you errors for that page, so test a few pages out in GTmetrix to make sure you took care of all redirects throughout your website.

minimize redirects

Better-Search-Replace-WWW-Versions

 

10. Avoid External HTTP Requests

Third party scripts can be found in the reduce DNS lookups section of GTmetrix. These are anything that creates HTTP requests from outside websites (Google Fonts, Analytics, Maps, AdSense, embedded YouTube videos, and even social sharing buttons or social media widgets).

Some scripts are easy to optimize:

  • Optimize fonts with the OMGF plugin
  • Host Google Analytics tracking code locally
  • Disable and optimize Gravatars on blog comments
  • Generally, only use a Google Map on the contact page
  • Replace YouTube iframe with preview image (in WP Rocket)

Other scripts like Google AdSense and Google Tag Manager are much more difficult and can absolutely ruin your GTmetrix report, which is why I recommend affiliate marketing instead.

WordPress External Scripts

Preconnect + Prefetch
If you absolutely must use an external resource throughout your site, you should preconnect/prefetch it. This basically lets the browser anticipate external resources to make it load faster. WP Rocket, Perfmatters, and other plugins have options for this, otherwise you can also use the Pre* Party Resources Hints plugin. If using StackPath, you should also add your CDN URL here. Luke (from Bluehost) created a list of common domains to prefetch on GitHub.

 

12. Find Bottlenecks In GTmetrix

Slow plugins, images, scripts, and individual elements can all be found in your GTmetrix Waterfall tab. Learn which elements take longest to load and focus on those optimizations. Good hosting and correctly configuring a solid cache plugin should fix most errors in GTmetrix.

1s-2020-GTmetrix-Report

Other Optimizations To Consider

  • Use a lightweight WordPress theme
  • Avoid page builders (or if you do use one, use Oxygen)
  • Optimize WooCommerce scripts, styles, cart fragments in Perfmatters

 

13. Consider Moving To Cloudways

Switching from HostGator to DigitalOcean on Cloudways is night and day.

I signed up for 15+ hosting accounts to test their speed. All domains in this video are live, which means you can visit them in real-time and click through their pages, use GTmetrix, etc.

Each website is identical except for it’s hosting (same Astra Starter Site, SSL, no caching, no CDN, and the same 6 plugins). I also used WP Hosting Performance Check and KeyCDN to measure the most popular options. The results align with what most people are saying in the WordPress Hosting Facebook Group which I recommend joining to get real, unbiased opinions.

I moved from SiteGround to DigitalOcean on Cloudways and the results speak for themselves. I’m also paying 1/2 of what I was. Cloudways also does free migrations which made it very easy.

SiteGround-vs-Cloudways

#1. DigitalOcean On Cloudwayscwdoserver.com was the fastest, is who I use, and are very popular in Facebook Groups (especially as an alternative to SiteGround). DigitalOcean is also the only host mentioned in the WordPress Optimization Guide. Cloudways was #1 in most recent Facebook polls and people who migrate usually see significant load time improvements. They use PHP 7.4, Maria DB 10.3, Memcached, Varnish, Nginx, and Redis. Pricing starts at $10/month with no strict CPU limits or renewal prices like on other hosts. The community manager is very helpful and they do free migrations. You can get 25% off your first 2 months with the promo code OMM25.

#2. Kinstaknstaserver.com had similar speeds as DigitalOcean on Cloudways only they are more expensive starting at $30/month. Known for being capable of handling many concurrent visitors. People consistently recommend Kinsta in Facebook Groups, Twitter, and in migration results. Even though they’re not always #1 in Facebook polls (likely because not everyone can pay $30+/month), they are great for high traffic sites.

#3. WPX Hostingwpxserver.com is also very quick, but Cloudways and Kinsta are slightly faster. Starts at $20-$25/month and is who Matthew Woodward recommends.

#4. A2 Hostingatwoserver.com usually outperformed other shared hosting but is not nearly as fast as cloud hosting (just cheaper). I use A2 for my girlfriend’s restaurant website and it’s decently fast with good uptimes. A2 (and all shared hosting) is only sufficient for smaller websites with low traffic/plugins. Otherwise, use cloud hosting.

#5. SiteGround – has gone downhill with many complaints about their renewal prices, price hikes, CPU limits, and support isn’t as good as it used to be. SiteGround shifted to Google Cloud hosting (instead of shared) which is supposed to be faster, but load times and TTFB on stgrndserver.com were usually above 1s. Their SG Optimizer plugin should help, but I still wouldn’t use them. You’re better off on Cloudways DigitalOcean.

Affiliate Disclaimer – I would seriously appreciate you using my affiliate links which means I earn a commission at no expense to you. This would help me make GoFundMe donations ($6,000 so far)! I try to base my recommendations on tests, Facebook polls, and conversations I see on a daily basis in the 30+ WP Facebook Groups I’m active on.

I would personally skip shared hosting since cloud hosting is exponentially faster. This is especially true if you’re on GoDaddy or EIG brands (eg. Bluehost and HostGator) and for resource-intensive websites running WooCommerce, WPML, page builders, or slow plugins.

There are plenty of migration results if you check Twitter and Facebook Groups. Avoid the bloggers promoting Bluehost and WP Engine because they have the highest commissions and do your research. Hosting is the #1 factor in WordPress’ optimization guide – very important!

Cloudways Response Times

Godaddy to DigitalOcean Migration

VPS Cloud Hosting WooCommerce Poll

Hosting Recommendations Facebook

2017-WordPress-Hosting-FB-Poll

2018 Hosting Recommendations

Favorite Hosting For Elementor

Untitled

Vultr Migration

WordPress Hosting Suggestions

VPS Cloud Hosting Poll

2016-WordPress-Hosting-FB-Poll

July 2019 Hosting Recommendation

Elementor Hosting Recommendations

Cloudways Facebook Review

 

Hire 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 profile. Serious inquiries only, and please don’t expect 100% scores if you’re HostGator’s slow WordPress hosting, a bloated theme, and tons of heavy plugins. Please follow this guide first.

Pronaya-Kumar-S-Reviews

Review of Pronaya on his profile:

BDkamol-WordPress-Speed-Reviews

 

Frequently Asked Questions

🚀 How can I speed up my site on HostGator?

Upgrade to the highest possible PHP version inside your HostGator account, configure a good cache plugin like WP Rocket, optimize images with ShortPixel, setup Cloudflare's CDN, and avoid common slow plugins. This will be a great start to make your site faster.

🚀 How do you upgrade PHP versions?

Login to your HostGator account and find the PHP Selector. Upgrade to the highest version. Test your website for errors. It's a good idea to take a backup beforehand.

🚀 Which cache plugin will yields the best results?

WP Rocket is usually rated the best cache plugin in Facebook polls and will typically yield the best results since it has more speed optimization features than other cache plugins.

🚀 Which plugins cause slow load times?

The most common slow plugins include social sharing, statistics (analytics), sliders, portfolios, page builders, calendars, and live chat plugins. WooCommerce sites are usually slower because they require extra scripts, styles, cart fragments, and usually more plugins as well. See my list of 65+ slow plugins to avoid.

🚀 How do you setup a CDN?

Sign up for a free Cloudflare account, copy the 2 nameservers provided by Cloudflare, and change nameservers to Cloudflare's in your domain registrar.

See Also: How I Optimized My WordPress Site To Load In <1s

I hope you found this tutorial helpful! Retest your site in GTmetrix and if your WordPress hosting is still slow on HostGator leave me a comment and I’ll be glad to help. I tried to include everything here but I know it can get technical, so drop me a line if need be. Or if you were able to make your site faster, I would love to hear about your new scores and page load times.

Cheers,
Tom

How To Reduce Server Response Times (Time To First Byte) In WordPress To Under 200ms: Item In Google PageSpeed Insights

Reduce Server Response Time

So you ran your WordPress site through Google PageSpeed Insights and need to reduce server response times.

Let’s get this out of the way.

Servers are controlled by your hosting. Shared hosting (GoDaddy, Bluehost, HostGator) has insufficient server resources to make sure your site fast, let alone run high CPU things like WooCommerce, Elementor, WPML, or AdSense. Even SiteGround has strict CPU limits. Moving from shared hosting to cloud hosting should immediately fix this. Otherwise, you will need to lighten the load on your server by doing things like removing high CPU plugins and using a CDN.

TLDR; move away from shared hosting and use cloud hosting. Cloudways is who most people recommend in Facebook Groups and #1 in numerous Facebook polls.

How To Reduce Server Response Times In WordPress

  1. Avoid EIG And Poor Hosting
  2. Upgrade To Cloud Hosting 
  3. Check Your CPU Usage
  4. Eliminate High CPU Plugins
  5. Upgrade To PHP 7.3
  6. Configure Optimal Cache Plugin Settings
  7. Add Cloudflare
  8. Block Unwanted Bots
  9. Clean Your Database
  10. Optimize Images
  11. Optimize External Scripts
  12. Delete Unused Themes + Plugins
  13. Enable Hotlink Protection
  14. Update WordPress Software
  15. Frequently Asked Questions

Reduce-Server-Response-Time-Facebook

 

1. Avoid EIG And Poor Hosting

If you have slow server response times, I bet you are hosted with GoDaddy, EIG brands (Bluehost or HostGator), Namecheap, or another low quality host. Even SiteGround has many complaints about a slow TTFB especially on their cloud hosting. Do your research on EIG, SiteGround’s TTFB, and join the WordPress Hosting Facebook Group to get unbiased opinions.

List-Of-EIG-Brands

Cloud hosting makes a huge difference.

Managed Hosting Poll

 

2. Upgrade To Cloud Hosting

Cloudways (cloud hosting) is much faster than shared hosting, including SiteGround.

Since they do free trials and free migrations, I suggest migrating to their DigitalOcean plan and retesting your server response time in PageSpeed Insights, as well as TTFB in GTmetrix and Google Search Console’s “time spent download a page”. Here’s what happened when I moved.

SiteGround-vs-Cloudways

Here’s what happened when other people moved:

Cloudways Response Times

WP Engine To Cloudways

DigitalOcean Pingdom Report

Godaddy to DigitalOcean Migration

Cloudways Server Response Times

Cloudways Load Time Improvement

Cloudways vs WP Engine

Untitled

Cloudways Pingdom Load Times

Cloudways Pingdom Report

Vultr Migration

Namecheap To Cloudways Migration

Cloudways WooCommerce Migration

Cloudways AWS Migration

I signed up for 15+ hosting accounts to test their speed. All domains in this video are live, which means you can visit them in real-time and click through their pages, use GTmetrix, etc.

Each website is identical except for it’s hosting (same Astra Starter Site, SSL, no caching, no CDN, and the same 6 plugins). I also used WP Hosting Performance Check and KeyCDN to measure the most popular options. The results align with what most people are saying in the WordPress Hosting Facebook Group which I recommend joining to get real, unbiased opinions.

Hosting-Comparisons

 

3. Check Your CPU Usage

Check your hosting account to make sure you’re not maxing out your CPU limits. Try to never exceed 80% of your limits so your server stays relaxed. On cloud hosting, you can add more CPU + RAM which will help, and on shared hosting you will have to upgrade your plan. But before you do, follow this guide as it should also help you reduce CPU consumed by your site.

Reduce-CPU-Usage-WordPress

That’s why it’s so important to choose a plan with enough server resources. Host companies give you guidelines based on your monthly visitors, but they don’t take into account how many plugins you have, whether they consume lots of resources, and whether you’re using a CDN.

SiteGround-Server-Resources-Comparison

 

4. Eliminate High CPU Plugins

*Most slow WordPress plugins include social sharing, statistic (analytics), sliders, portfolios, page builders, calendars, chat, contact forms, related post, sitemap, Wordfence, WPML, WooCommerce, and any plugin that runs ongoing scans or processes. These can be identified using Query Monitor or Waterfall 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 (use Dr. Link Check)
  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. Essential Grid
  15. View Full List Of 65 Slow Plugins

Use GTmetrix To Find Your Slowest Plugins
If you see a plugin showing multiple times in GTmetrix, or it takes a long time to load in the Waterfall tab, you should either delete it or replace it with a more lightweight, faster plugin.

Slow WordPress Plugin

Recommended Lightweight Plugins

Other Plugin Tips

  • Be minimal
  • Deactivate + delete all plugins you don’t use
  • Avoid plugins that have duplicate functionality
  • Turn of specific plugin settings that consume CPU (eg. Query Monitor and Broken Link Checker constantly scan your site and consume CPU, delete them when you’re done)

 

5. Upgrade To PHP 7.3

Many WordPress sites still run PHP 5 even though PHP 7.3 is much faster. That’s because hosting companies won’t automatically upgrade your PHP version (due to potential compatibility issues) which you can use the PHP Compatibility Checker plugin to check for.

WordPress PHP Benchmarks

Upgrade to PHP 7.3 in your hosting account, then check your site for errors:

PHP Update

 

6. Configure Optimal Cache Plugin Settings

Most people don’t configure their cache plugin to the optimal settings. I have written popular tutorials on configuring WP Rocket, WP Fastest Cache, W3 Total Cache, and WP Super Cache.

With most other cache plugins, you would need to install about 6 extra plugins to get these features, when WP Rocket has them all built-in, reducing the number of plugins on your site. If you’re like me, you only want to use 1 plugin, otherwise you will need to research which features your cache plugins comes with, then install these plugins if it doesn’t support them.

WP-Rocket-Features

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

 

7. Add Cloudflare

Cloudflare’s free CDN offloads bandwidth consumption to their data centers (putting less stress on your server) while reducing the geographical distance between your server/visitor.

Here’s what WordPress says:

CDN-WordPress-Recommendation

Here’s the bandwidth you can save with Cloudflare:

Cloudflare-Bandwidth-Savings

Most hosts have an option to enable Cloudflare in their cPanel:

SiteGround-Cloudflare-Activation

You can also setup Cloudflare using most cache plugins (below is for WP Rocket), but WP Fastest Cache and W3 Total Cache also have options for Cloudflare + CDN integration…

WP-Rocket-Cloudflare-Add-On

 

8. Block Unwanted Bots

Have you checked your Wordfence live traffic report lately?

I did, and I saw the same few bots were hitting my site constantly and putting stress on my server. Obviously Googlebot and other ones are good, there may also be spam bots hitting your site. Unless you check, you’ll never know. Here’s what I did, and what you should do too:

Step 1: Install Wordfence.

Step 2: View the live traffic report for a few minutes to see who is hitting your site in real-time.

Live-Traffic-Report-Wordfence

Step 3: Take note of sketchy-looking bots constantly hit your website. Google their hostnames to see if other people are reporting them as spam (Googlebot and Bingbot are obviously okay).

Step 4: Block all spam bots (you have a few options here). Wordfence has blocking settings as well as rate limiting rules. However, Wordfence consumes a lot of CPU itself. The alternatives are Blackhole For Bad Bots, Block Bad Queries, or Cloudflare Firewall Rules (this is what I use). You can create up to 5 free firewall rules which means you can block your top 5 spam bots. Just copy their hostname from Wordfence, then block it in Cloudflare. Be sure to use an asterisk* so any variations of that bot are also blocked: amazonaws.com linode.com are 2 common ones.

Cloudflare Firewall Rule To Block Bad Bots

 

9. Clean Your Database

If you deleted a plugin, theme, have lots of post revisions, spam comments, or expired transients, clean your database. You should do this every week or so to keep your site fast.

If using WP Rocket, run this in the database settings:

WP-Rocket-Database-Settings

If not using WP Rocket, use the free WP-Optimize plugin:

WP-Optimize Clean Database

 

10. Optimize Images

We’ll use GTmetrix for this. Run your site through GTmetrix and in your report you’ll see images can be optimized 3 ways. GTmetrix only shows unoptimized images for a single page so start by optimizing images that appear on multiple pages (logo, sidebar and footer images), then run your most important pages through GTmetrix and fix individual images on those too.

There are 3 ways to optimize images in GTmetrix:

  • Serve scaled images – resize large images to be smaller
  • Specify image dimensions – specify a width/height in the image’s HTML or CSS
  • Optimize Images – losslessly compress images using Imagify

image-optimization

Serve Scaled Images – GTmetrix tells you which images are too large and the dimensions they need to be resized to. Find the image, crop or resize it, upload it to WordPress, then replace the old image with the new one. Follow your “image containers” and create a cheat sheet (below). You can manually check for large images by right clicking an image → copy image address then go to that URL where you should see if it’s too large. Never use the drag to resize feature in the visual editor since this only resizes the displayed image (not the actual image).

Sample cheat sheet:

  • Logo: 150(w) x 37(h)
  • Sliders: 1950(w) x 550(h)
  • Sidebar Widgets: 319(w)
  • Blog content body: 600(w)
  • Featured images: 200(w) x 200(h)
  • Carousel images: 225(h)

Specify Image Dimensions – refer to your GTmetrix report and expand these items to see which images need this. Locate each one in WordPress, then specify the dimensions (width/height) which GTmetrix will tell you. The visual editor takes cares of this automatically so you usually have to do this with images that are in widgets, page builders, and other places.

specify-image-dimensions

Optimize Images – losslessly compress images using Imagify or Kraken (both are free until you reach the monthly limit). While there are other completely free plugins that offer unlimited compressions, do NOT use these since they have bugs, won’t work, or will break your images.

Imagify Instructions

  1. Install the Imagify Plugin
  2. You will be prompted with instructions
  3. Sign up for Imagify and enter your API key
  4. Set your compression level (normal, aggressive, ultra)… I use aggressive
  5. Imagif’em all (bulk compresses all images on your site)
  6. Once your limit is up, buy a plan or wait next month to reset your limit

imagify

imagify-wordpress-image-optimization

When you’re done, run your pages through GTmetrix and make sure all 3 items are 100%.

 

11. Optimize External Scripts

If you’re using third party scripts, these cause extra requests and will show up in your GTmetrix report. Some scripts are difficult or even impossible to optimize (especially Google AdSense and social widgets which are best to avoid all together), but I listed quite a few optimizations below.

Third-Party-Usage

Tips For Optimizing External Scripts

 

12. Delete Unused Themes + Plugins

Head to Appearance → Themes and delete any themes you’re not using. You can keep one version (eg. Twenty Seventeen theme) in case something goes wrong with your active theme.

Delete Unused WordPress Themes

Delete WordPress Plugins

 

Cloudflare and some hosting companies let you enable hotlink protection which prevents people from copying/pasting your images on their website (which sucks up your bandwidth).

Cloudflare Hotlink Protection

 

14. Update WordPress Software

Keep WordPress core, themes, and plugins updated.

WordPress Updates

 

15. Frequently Asked Questions

✅ Why causes a slow server response time?

Servers are controlled by your hosting. If you're using a low quality host or are putting too much stress on your server (eg. too many plugins), this can cause slow response times.

✅ Which hosting has slow servers?

GoDaddy, Bluehost, HostGator, and EIG brands are infamous for having slow servers. The top 2 rated hosts in Facebook polls are usually SiteGround (shared hosting) and Cloudways (cloud hosting). Migrating to a faster host is the easiest way to remedy a slow server.

✅ What is a good server response time?

Google recommends a server response time of <200ms. However, this is usually only possible if you are knowledgable about website optimization and are using fast hosting.

✅ What affects server response times?

Hosting, cache plugins, high CPU plugins, spam bots crawling your site, whether you're using a CDN, and optimizing images can all affect server response times.

✅ How do you measure server response times?

Google PageSpeed Insights is the best way to measure server response times.

Conclusion: join the WordPress Hosting Facebook Group to get real, unbiased opinions. Look at the Facebook polls that were taken and people who migrated to different hosts and posted their results. Finally, stay clear of low quality hosting affiliates who only want the commissions.

Do your research is all I’m sayin’:

Bluehost-Managed-WordPress-Hosting

HostGator Feedback

Godaddy Managed WordPress Hosting Feedback

Cheers,
Tom