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

Have a slow WooCommerce site?

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

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

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

Slow-WooCommerce-Site

 

1. Disable Cart Fragments

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

perfmatters woocommerce optimization

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

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

WooCommerce Cart Fragments

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

 

2. Disable WooCommerce Styles

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

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

WooCommerce styles in query monitor

Disable all WooCommerce stylesheets:

Disable specific stylesheets:

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

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

 

3. Disable WooCommerce Scripts

WooCommerce also causes lots of scripts:

WooCommerce Scripts

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

Add this to your functions.php:

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

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

perfmatters script manager

 

4. Clear Customer Sessions

In your WooCommerce Status settings, clear customer sessions:

Clear Customer Sessions

 

5. Clear WooCommerce Transients

In your WooCommerce Status settings, delete all transients:

Delete WooCommerce Transients

 

6. Disable The WordPress Heartbeat API

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

Heartbeat-Control-Plugin

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

WP-Rocket-Heartbeat-Control

 

7. Use A Lightweight WooCommerce Theme

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

StudioPress eCommerce themes

Themes I recommend from ThemeForest:

Slow WooCommerce theme

 

8. Resize Product Images To Smaller Dimensions

This is what serve scaled images means in GTmetrix.

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

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

Serve Scaled Images

Create a cheat sheet for your most commonly used images:

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

 

9. Don’t Use Too Many Extensions

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

WooCommerce Extensions

 

10. Use A Better Cache Plugin

There are 3 factors when it comes to cache plugins:

  • If you’re using a cache plugin
  • Which cache plugin you’re using
  • Whether you’ve configured the optimal settings

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

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

2016 best cache plugin poll

2019 cache plugin poll

Swift vs WP Rocket

2016 cache plugin poll

Best cache plugins 2018 poll

wp rocket vs w3 totla cache

Cache Plugin Tutorials:

 

11. Avoid Resource-Hungry Plugins

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

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

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

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

Slow WordPress Plugin

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

Query Monitor Slow Plugins

You don’t need that many plugins!

Too many WooCommerce plugins

 

12. Delete Unused Themes + Deactivated Plugins

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

Delete-Unused-WordPress-Themes

 

13. Compress Images With ShortPixel

This is what optimize images means in GTmetrix.

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

ShortPixel Settings

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

Image Optimizations In GTmetrix

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

 

14. Clean Your WooCommerce Database

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

WP-Optimize plugin

WP-Optimize Clean Database

 

15. Clean Your WordPress Backend With Clearfy

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

Clearfy Performance Settings

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

perfmatters features

 

16. Block Bad Bots

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

Step 1: Install Wordfence.

Wordfence Security Plugin

Step 2: View your live traffic report.

Live-Traffic-Report-Wordfence

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

Step 4: Block the spam bots.

Wordfence-Blocking-Rule

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

Blackhole for Bad Bots

Cloudflare Firewall Rule To Block Bad Bots

 

17. Upgrade To PHP 7.4

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

WooCommerce PHP Benchmarks

WordPress PHP Stats

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

WooCommerce PHP Version

Then upgrade to PHP 7+ in your hosting account:

PHP-7.4

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

 

18. Combine Google Fonts

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

Google Fonts Pingdom

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

Autoptimize Combine Google Fonts

Option 2: Try the CAOS for WebFonts plugin:

CAOS-Fonts

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

Transfonter-Google-Font-Conversion

 

19. Setup Cloudflare’s Free CDN

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

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

Cloudflare-Data-Centers

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

StackPath-Data-Centers

 

20. Pinpoint The Problem With Query Monitor

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

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

 

21. Ignore Google PageSpeed Insights (Use GTmetrix)

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

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

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

Reduce Server Response Time

 

22. Avoid EIG Hosting

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

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

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

List-Of-EIG-Brands

Bluehost-EIG-Feedback

 

23. Check CPU Usage And Server Response Times

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

Bitcatcha Server Speed Report

Reduce-CPU-Usage-WordPress

GTmetrix-Time-To-First-Byte

 

24. Use Fast Hosting That Can Support WooCommerce

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

Hosting recommendations are usually garbage.

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

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

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

Here’s what happened when I moved:

SiteGround vs Cloudways

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

OMM-TTFB

The evidence is there:

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

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

WordPress-Hosting-2020-Pingdom-Test

Hosting Companies You Should Avoid

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

I use Cloudways because:

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

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

Just do your research and look at this Facebook thread.

 

Frequently Asked Questions

🚀 Why are WooCommerce sites slow?

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

🚀 How do you optimize cart fragments?

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

🚀 What are the 5 most important speed factors?

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

🚀 How do you optimize product pages?

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

🚀 What if you're running lots of plugins?

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

I hope this helped! Comment if you have questions.

Cheers,
Tom

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

WP-Rocket-Settings

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

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

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

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

 

1. Dashboard

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

WP-Rocket-Dashboard-Settings

 

2. Cache

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

WP-Rocket-Cache-Settings

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

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

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

 

3. File Optimization

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

WP-Rocket-File-Optimization-Settings-2020

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

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

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

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

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

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

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

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

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

 

4. Media

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

WP Rocket Media Settings

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

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

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

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

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

 

5. Preload

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

WP-Rocket-Preload-Settings-2020

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

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

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

WordPress External Scripts

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

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


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

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

Google-Fonts-Waterfall

 

6. Advanced Rules

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

Otherwise, leave this blank.

WP-Rocket-Advanced-Rules

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

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

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

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

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

 

7. Database

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

WP-Rocket-Database-Settings

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

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

WP-Optimize-Tables

 

8. CDN

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

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

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

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

WP-Rocket-CDN-Settings-2020

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

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

Example:

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

 

9. Heartbeat

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

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

WP-Rocket-Heartbeat-Settings

 

10. Add-Ons

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

WP-Rocket-Add-Ons

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

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

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

Cloudflare – enable if using Cloudflare.

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

 

11. Cloudflare

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

Cloudflare-Bandwidth-Savings

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

Cloudflare-GoDaddy-Nameservers

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

SiteGround-DNS-Records

Add your Cloudflare information to WP Rocket.

WP-Rocket-Cloudflare-Add-On

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

Cloudflare Global API Key

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

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

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

http://*yourwebsite.com/*

Always-Use-HTTPS-Page-Rule

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

yourwebsite.com/wp-admin*

WordPress-Admin-Page-Rule

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

yourwebsite.com/wp-content/uploads*

WP-Uploads-Page-Rule

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

 

12. Image Optimization

WP Rocket recommends Imagify because it’s their plugin.

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

WP-Rocket-Image-Optimization

 

13. Tools

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

WP-Rocket-Tools-2020

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

Import Settings – import your pre-configured settings here.

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

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

 

WP Rocket = #1 Rated Cache Plugin

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

WP Rocket incorporates:

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

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

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

Here are the Facebook polls:

2016 best cache plugin poll

2019 cache plugin poll

Swift vs WP Rocket

2016 cache plugin poll

Best cache plugins 2018 poll

wp rocket vs w3 totla cache

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

WP Rocket (.406)
Pingdom Page Speed Test

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

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

 

Recommended Host: Cloudways

Hosting recommendations are usually garbage.

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

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

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

Here’s what happened when I moved:

SiteGround vs Cloudways

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

OMM-TTFB

The evidence is there:

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

 

I use Cloudways because:

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

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

Just do your research and look at this Facebook thread.

 

View My Full WordPress Speed Guide

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

 

FAQs / Documentation

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

wp rocket documentation

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

wp rocket video tutorials

Tutorials I found the most helpful:

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

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

🚀 How do I add a CDN with WP Rocket?

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

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

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

🚀 Which image optimization plugin works best with WP Rocket?

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

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

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

 

Get Help From My WordPress Speed Optimizer

Still need help with your GTmetrix report?

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

Pronaya-Kumar-S-Reviews

Here are some reviews on his profile:

BDkamol-WordPress-Speed-Reviews

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

See Also: How I Got 100% Scores In GTmetrix

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

Cheers,
Tom

How To Fix Bluehost’s Slow WordPress Hosting (13 Ways)

Have a slow website on Bluehost?

To speed up a slow Bluehost website, activate Cloudflare’s CDN and PHP 7.3 in your cPanel. Install a cache plugin, avoid high CPU plugins, and optimize your images, database, and fonts.

However, Bluehost is notoriously slow and overcrowds servers.

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

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.

slow Bluehost

Maybe we can get your site faster than this post which has lots of images and comments:

Bluehost GTmetrix

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

Easy Ways To Fix A Slow Website On Bluehost

  • Use Bluehost’s latest PHP version (PHP 7.3)
  • Active Cloudflare’s CDN inside Bluehost
  • Install and set up a top-rated caching plugin
  • Remove junk from your database using WP-Optimize
  • Avoid common slow loading plugins and page builders
  • Find large images in GTmetrix and make them smaller
  • Losslessly compress images using a plugin like TinyPNG
  • Be minimal with fonts + weights and using the OMGF plugin
  • Optimize external scripts using plugins like WP Rocket’s Add-Ons

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, or see migration results. Visit the websites and click through their pages – you will see the difference in speed.

 

1. Measure Your 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
  • High TTFB (time to first byte) in GTmetrix Timings tab
  • High PageSpeed and YSlow scores in GTmetrix, but a slow load time
  • 503 service unavailable errors which 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. Identify Bottlenecks In GTmetrix

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:

  • 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

 

3. 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

 

4. 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.

 

5. 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)
  • Optimize Google Fonts (built-in to WP Rocket, or use CAOS For Fonts, or SHGF)
  • Integration with Cloudflare + other CDNs (built-in to WP Rocket, or use CDN Enabler)

2016 best cache plugin poll

2019 cache plugin poll

Swift vs WP Rocket

2016 cache plugin poll

Best cache plugins 2018 poll

wp rocket vs w3 totla cache

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

 

6. 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.

 

7. Find And Fix 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
  8. Constant Contact for WordPress
  9. Contact Form 7
  10. Contextual Related Posts
  11. Digi Auto Links
  12. Disqus Comment System
  13. Divi Builder
  14. Elementor
  15. View Full List Of 65 Slow Plugins

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

 

8. 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

 

9. Avoid Using Slow Page Builders On Shared Hosting

Yes, even Elementor.

Elementor and other page builders load lots of scripts on your entire website which you can check using Asset CleanUp or Perfmatters. It also consumes more resources (when editing) than Gutenberg or alternative faster page builders. In general, I would not recommend using a page builder on shared hosting unless it’s Oxygen. The only thing I regret when designing my new website is not creating it in Oxygen. See how many times Elementor is in the source code?

Elementor Scripts

If you decide to keep Elementor, at least disable all addons, modules, and scripts you’re not using. Most Elementor plugins have an option to toggle modules on or off. Next, view your scripts in Asset CleanUp or Perfmatters and disable the ones you’re not using (I would do this on a staging website since toggling these can break things if they’re in use). It requires testing.

Disable-Addons

 

10. Combine Google Font Files

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

 

11. 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 image (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

 

12. 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

 

13. Consider Moving To Cloudways

Hosting recommendations are usually garbage.

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

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

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

Here’s what happened when I moved:

SiteGround vs Cloudways

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

OMM-TTFB

The evidence is there:

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

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

WordPress-Hosting-2020-Pingdom-Test

Hosting Companies You Should Avoid

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

I use Cloudways because:

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

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

Just do your research and look at this Facebook thread.

 

Frequently Asked Questions

Why is my website slow on Bluehost?

Bluehost is shared hosting and lacks server resources. These are needed to accomodate high CPU tasks like WooCommerce, AdSense, and even Elementor. Configuring a cache plugin with a CDN is one of the most effective ways to fix a slow website on Bluehost.

How to fix a slow server response time on Bluehost?

You can fix a slow server response time on Bluehost by upgrading to the latest PHP version, configuring a cache plugin with a CDN, and cleaning up your database. If these don't work, consider moving away from shared hosting.

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.

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 A Slow Website On HostGator’s WordPress Hosting

HostGator Slow

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’s hosting is slow, run your site through Google PageSpeed Insights to see if reduce server response times is in your report. If yes, your HostGator server is slow. This may be because you’re running resource-hungry plugins like WooCommerce or Elementor, since shared hosting often doesn’t have enough server resources to accommodate high CPU plugins.

HostGator’s shared hosting is infamously slow and there are countless complaints about their slow servers in Facebook Groups. I suggest joining a few (like the WordPress Hosting Facebook Group) to get real, unbiased opinions. There are much better options like DigitalOcean on Cloudways which is who most people recommend and #1 in many Facebook polls. HostGator is owned by EIG (a publicly traded company) who is infamous for overcrowding servers for profits.

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.

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):

Quick Ways To Fix A Slow HostGator Website

  • Upgrade to the latest PHP version in HostGator
  • Install a solid cache plugin with a Cloudflare’s CDN
  • Use a fast page builder like Oxygen instead of Elementor
  • Use fast plugins and avoid commonly known slow plugins
  • Combine Google Fonts and be minimal with fonts and weights
  • Avoid uploading very large images which show errors in GTmetrix
  • Compress images using an image optimization plugin like TinyPNG
  • Remove junk from your database and delete tables left behind by old plugins
  • Lazy load images and videos which are often the heaviest elements on a page

 

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

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 Optimized WordPress Hosting, one is on Cloudways DigitalOcean who was rated the #1 host in Facebook polls, conversations, or see these migration results. Visit the websites and click through their pages – you will see the difference in speed.

 

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.

WordPress PHP Benchmarks

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. You can try these instructions, but I had to have their support team do this for me.

How To Update PHP Versions On HostGator

  • In your HostGator cPanel, go to Software → MultiPHP Manager.
  • Upgrade to PHP 7.3.
  • Check your website for errors. If you see any, revert to an earlier version.
  • Keep it updated to the latest version as HostGator releases new PHP versions.

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. Use 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.

Cloudflare-GoDaddy-Nameservers

3. HostGator says you will need to contact them to set up 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. Rethink Your Page Builder

Elementor and other page builders add lots of scripts to your website.

You can check these using Perfmatters or Asset CleanUp. The only page builder I recommend is Oxygen. I made the mistake of having my website redesigned in Elementor and you can see how many times it shows up in the source code. Add other Elementor plugins like Ultimate Addons and Premium Addons, and you could end up with a very slow website. While you can selectively disable some of these scripts, many of them need to be loaded and so, you’re stuck with them.

Elementor Scripts 1

Elementor Souce Code

 

6. 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
  8. Constant Contact for WordPress
  9. Contact Form 7
  10. Contextual Related Posts
  11. Digi Auto Links
  12. Disqus Comment System
  13. Divi Builder
  14. Elementor
  15. View Full List Of 65 Slow Plugins

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

 

7. Optimize Images To Load Faster

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.

 

8. Disable Unused Functionality

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

 

9. Clean Your WordPress 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

 

10. 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

 

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

Hosting recommendations are usually garbage.

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

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

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

Here’s what happened when I moved:

SiteGround vs Cloudways

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

OMM-TTFB

The evidence is there:

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

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

WordPress-Hosting-2020-Pingdom-Test

Hosting Companies You Should Avoid

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

I use Cloudways because:

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

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

Just do your research and look at this Facebook thread.

 

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

 

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, set up 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 set up 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

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

Servers are controlled by your hosting. The easiest way to reduce server response times in WordPress is to upgrade to a more powerful server since shared hosting has strict CPU limits. Also try using a CDN to offload resources, remove high CPU plugins, and clean your database.

Shared hosting (GoDaddy, Bluehost, HostGator, even SiteGround) has insufficient server resources to make sure your WordPress site fast, let alone run high CPU plugins and tasks 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 reduce server response times by lowering CPU usage and lightening the load on your server.

Reduce-Server-Response-Times-WordPress

TLDR; Cloudways is who most people recommend in Facebook Groups and will fix your TTFB.

Short Server Response Time

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

Hosting recommendations are usually garbage.

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

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

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

Here’s what happened when I moved:

SiteGround vs Cloudways

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

OMM-TTFB

The evidence is there:

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

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

WordPress-Hosting-2020-Pingdom-Test

Hosting Companies You Should Avoid

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

I use Cloudways because:

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

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

Just do your research and look at this Facebook thread.

 

3. 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
  8. Constant Contact for WordPress
  9. Contact Form 7
  10. Contextual Related Posts
  11. Digi Auto Links
  12. Disqus Comment System
  13. Divi Builder
  14. Elementor
  15. View Full List Of 65 Slow Plugins

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

Lightweight Plugin Alternatives

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.4

Many WordPress sites still run PHP 5 even though PHP 7.4 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.4 in your hosting account, then check your site for errors:

PHP-7.4

 

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 poll2019 cache plugin poll

Swift vs WP Rocket

2016 cache plugin pollBest 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

✅ What 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