How to fix a slow loading website and get closer to 100% GTmetrix

Slow Loading Website

Have a slow website?

If your website is loading slow, you can speed it up by using faster hosting, page builders, plugins, and images. Configuring a caching solution and CDN should also help, plus optimizing third party scripts like Google Fonts. Finally, make sure to clean you database and use PHP 7.4.

What if I told you my website loads in <1s with 100% GTmetrix scores? And that I’ve already written one of the most popular WordPress speed guides online with over 400 comments?

Some optimizations are specific to WordPress, others are universal. But they are all best practice even if you’re using Squarespace, Shopify, Wix, and other website building platforms.

If you have questions or need help, drop your GTmetrix report in the comments and I’ll give you a few pointers. You can also hire my website speed optimizer if you’re using WordPress.

 

1. Test Your Website In GTmetrix

GTmetrix shows you:

  • Load time (primary metric)
  • Which images need to be optimized
  • Which plugins are loading slow (check the Waterfall tab)
  • Your time to first byte (indicates the speed of your hosting)
  • Whether your cache plugin is doing it’s job (I recommend WP Rocket)
  • Whether you’re using a content delivery network (I recommend Cloudflare)
  • Slow loading external resources (AdSense, Maps, YouTube/Facebook embeds)

Quick Fixes?
Hosting is the #1 factor in the official WordPress optimization guide (by far). It may not improve GTmetrix scores, but it can improve load times by multiple seconds especially if you go from a slow host (Bluehost, HostGator, GoDaddy) to a fast host (Cloudways). They were rated highest in recent Facebook polls I collected from multiple WordPress Facebook Groups, and who I use.

Cache plugins have the biggest impact on scores and also improve load times. WP Rocket is better than W3 Total Cache or WP Fastest Cache as it has more features (like lazy loading, database cleanup, and Google Font + Analytics optimization) while other cache plugins do not.

WordPress Speed Video Tutorial
If you’re using WordPress, I spent many hours creating this 42 minute video on speed up WordPress sites. You can use timestamps in the video description to jump to specific sections.

Here’s my GTmetrix report. 1.3s load times are fast when you have a 2.56MB page size, 89 requests, 400+ comments while showing Gravatars, over 70 images, and an embedded video.

2020-GTmetrix-Report

 

2. Resize Large Images

This is what serve scaled images means in GTmetrix.

It means you’re uploading large images with incorrect dimensions. Each section of your website has specific dimensions (sliders, thumbnails, carousel, fullwidth and sidebar images).

For example, I know my blog’s content body is 680 pixels in width. Any fullwidth images I use for my blog should always be resized to those dimensions.

GTmetrix shows you all unoptimized images (and the correct dimensions they should be resized to) but only for the single page you test. All you have to do is resize those images and replace the old version with the new one.

Serve Scaled Images

Bonus: create a cheat sheet – write down all the different images sizes on your website.

  • Logo: 200 x 58px
  • Favicon: 16 x 16px
  • Sliders: 1903 x 400px
  • Carousel images: 115px
  • Widget images: 420 x 250px
  • Featured images: 250 x 250px
  • Fullwidth blog post images: 680px
  • Yoast Twitter OG Image: 1024 x 512px
  • Yoast Facebook OG Image: 1200 x 630px

Squarespace, Wix, and WordPress themes should include instructions for resizing images.

 

3. Compress Images

This is what optimize images means in GTmetrix.

There are many tools to do this (I use the ShortPixel WordPress plugin). Be sure to remove EXIF data to make images load even faster, which can also be done in some of the tools below.

image-optimization

Image Compression Tools

Will I Lose Quality?
Even if you choose lossless compression, you might notice a small loss in quality. That’s why it’s best to test a couple images beforehand, and take a backup if you’re bulk optimizing all images.

 

4. Add Caching

If you’re not using WordPress, your platform should take care of caching, minification, combining files, and other optimizations in GTmetrix that would usually require a plugin.

If you’re using WordPress, ask yourself:

  • Are you using a cache plugin?
  • Which cache plugin are you using?
  • Have you configured it to the optimal settings?

These 3 factors will have the highest impact on your scores in GTmetrix, Google PageSpeed Insights, and pretty much any speed testing tools. Caching and hosting are super important!

Which Cache Plugin Is Best?
I recommend WP Rocket which is a premium cache plugin. It comes with many features other cache plugins don’t (database cleanup, heartbeat control, lazy loading, optimization of Google Fonts + Analytics, CDN integration). If you wanted to use these features with other cache plugins, you would need to install about 6 extra plugins to take care of these optimizations, while WP Rocket has everything built-in. The closest free cache plugin that do these is Swift.

WP Rocket was also rated #1 in multiple 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

 

5. Upgrade To PHP 7.4

This only applies if you bought hosting (eg. SiteGround, Bluehost, GoDaddy).

Upgrading to PHP 7+ is very simple and should make a significant impact on load times.

WordPress PHP Benchmarks

Step 1: Login to your hosting account and find the PHP version manager (or similar).

Step 2: Upgrade to the highest PHP version available on your hosting account (eg. PHP 7.4).

Step 3: Test your website for errors. If you see any, it’s probably due to incompatible WordPress plugins, in which case you can use PHP Compatibly Checker. This tool will show you incompatible plugins; you should either delete them, or revert to an earlier PHP version.

Step 4: Keep your PHP version current. If your host releases a new stable PHP version, use it.

PHP-7.4

 

6. Check Server Response Times

Google PageSpeed Insights tells you if you have a slow server response times (Google recommends it should be under 200ms). Servers are obviously controlled by your hosting.

Reduce Server Response Time

How To Improve Server Response Time

  • Get better hosting (eg. Cloudways)
  • Stay away from EIG hosts who are infamously slow
  • Make sure you have caching enabled on your website
  • Use a content delivery network like Cloudflare’s CDN
  • Eliminate all heavy and unused plugins on your website
  • Use a premium DNS provider (get this through your host)

 

7. Choose The Right 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.

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.
 

8. Add Cloudflare’s CDN

A CDN (content delivery network) means your website is hosted on multiple data centers around the world. This reduces the geographical distance between your server and visitor, while offloading resources to those data centers (lightening the load on your own server). You can even use multiple CDNs like StackPath or KeyCDN which adds even more data centers.

CDN-WordPress-Recommendation

Cloudflare is free and has 200+ data centers which is well over most premium CDNs.

Step 1: Check if your host lets you enable Cloudflare in your account. If they do, activate Cloudflare then you’re done. If they don’t, you’ll need to change nameservers starting in step 2.

Cloudflare-Nameserver-Change

Step 2: Sign up for Cloudflare, choose the free plan, add your website, then let Cloudflare run their scan. Cloudflare will walk you through a set of pages until they assign you 2 nameservers.

Step 3: Login to your domain registrar and find the option to set custom nameservers (Google “custom namesevers on XYZ hosting company)”. Replace those nameservers with Cloudflare’s.

 

9. Disable Hotlinking

If you have high quality images on your website, people might be “borrowing” them to use on their own site. But instead of saving and uploading the images, people will copy/paste them from your site to theirs. This means you are hosting those images on your server (not good).

You can enable hotlink protection in Cloudflare or often times, in your hosting account. This prevents people from using up your precious server resources by copying/pasting your images.

Cloudflare Hotlink Protection

 

10. Minify Files

GTmetrix tells you to minify HTML, CSS, and JavaScript files.

Your cache plugin should take care of this (if not, make sure their settings are enabled).

 

11. Combine Files

If you have multiple CSS or JavaScript files, try combining in them into 1 single file.

The less CSS and JavaScript files you have, the less requests will be loaded on your website.

Step 1: Find your CSS (or JavaScript files).

Step 2: Copy/paste the contents so they’re all in one file.

Or, most cache plugins have an option to combine CSS + JavaScript:

Minify Combine JavaScript Files

 

12. Avoid Heavy Plugins

If you’re using WordPress plugins, Joomla Extensions, or any “add-ons” that add functionality to your website, make sure they don’t add to your load times (use GTmetrix for benchmarks).

The most common slow plugins are related to portfolios, sliders, social sharing, page builders, live chat, calendars, statistic (analytics), contact form, or related post plugins.

How To Find Slow Plugins On Your Website
If you see the same plugin showing up multiple times in your GTmetrix report, and it has high load times in your Waterfall tab, consider deleting it and replacing it with a more lightweight plugin. For WordPress, you can also use Query Monitor to see your slowest loading plugins.

Which Plugins To Avoid
See these 65+ slow WordPress plugins for the full 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. Facebook Chat

Bonus: Selectively Disable Plugins
Use a plugin like Assets Manager to selectively disable plugins from running on certain pages. For example, if you only use your contact form on the contact page, disable it everywhere else.

 

13. Clean Your Database

As you update posts, install and delete plugins, or perform other tasks on your website, this will start to accumulate bloat in your database. It’s best to clean it once every 2 weeks or so.

You can clean your database using the free WP-Optimize plugin, or use WP Rocket:

WP-Optimize Clean Database

 

14. Optimize External Resources

External resources are anything from embedded YouTube videos to Google Fonts, Google Analytics, Gravatars, and anything requiring information to be pulled form an outside website. These can destroy your GTmetrix report, especially Google AdSense as it runs on every page.

Tips For Optimizing External Resources

 

15. Combine Google Fonts

Are you using Google Fonts, Font Awesome or other external fonts?

These will probably cause extra requests in GTmetrix since they are an external resource.

Google-Fonts-GTmetrix

Tips For Optimizing Google Fonts

  • Host Google Fonts locally
  • Only select fonts/weights you need
  • Combine multiple font files into 1 file (manually or via WP Rocket or Autoptimize)

 

16. Lazy Load Images + Videos

Lazy loading means images, videos, and iframes are only loaded once users scroll down the page and actually see them. This can significantly improve the initial load times of your pages.

Embedded videos can be one of the heaviest elements on a page – lazy loading 2 videos (and replacing the iframe with a preview image) shaved a whopping 4 seconds off one of my posts.

For WordPress, you can use WP Rocket, WP YouTube Lyte, or the Lazy Load plugin.

For Squarespace, try this Lazy Load feature.

WP-Rocket-Lazy-Load

 

17. Avoid Advertisements

Google AdSense is notorious for making websites load slow, and it’s not even that profitable. You can try Ad Balancer and Rocket Loader, but you will have many errors in your GTmetrix report regardless and are better off monetizing with affiliate marketing. Forget AdSense – most successful people making $50k+ are using affiliate links which don’t slow down your site.

GTmetrix-Advertisements

 

18. Consider AMP

AMP (accelerated mobile pages) make your mobile pages load faster while giving you an AMP stamp in mobile search results. The problem is, this changes the design of your mobile pages. You can use the AMP for WP plugin to customize them, but it’s just not the same. Kinsta’s conversions dropped 58% when adding AMP, so I actually decided to disable them on my own site. But it’s worth considering. Here’s an AMP tutorial for Squarespace if you’re using that.

 

19. Find Slow Pages In Google Analytics

You can find your slowest loading pages in Google Analytics under Behavior → Site Speed → Speed Suggestions.

Most often, these pages load slow because they have lots of images, videos, or external resources. That’s because most speed factors apply to your entire website, not just 1 page.

Speed-Suggestions-Google-Analytics

 

20. WordPress-Specifics Optimizations

I’ve already covered quite a few WordPress-specific optimizations, but here are a few more.

WordPress-Speed-Optimization-Guide

  • Use a top-rated cache plugin like WP Rocket
  • Use a good image optimization plugin like ShortPixel
  • Use the Heartbeat Control plugin to disable Heartbeat API
  • Delete all plugins you’re not using and use lightweight plugins
  • Clean your database frequently using WP-Optimize or WP Rocket
  • Cache Gravatars using a plugin like Harrys Gravatar Cache, FV, or Optimum
  • Use Asset Manager to selectively disable plugins from loading on certain pages
  • Host Google Analytics locally using a plugin like WP Rocket or CAOS Analytics
  • Host Google Fonts locally using a plugin like OMGF or Self-Hosted Google Fonts

 

21. WooCommerce Optimizations

By default, WooCommerce adds extra scripts, styles, and cart fragments to your website. They also typically require more plugins. That’s why when choosing a hosting plan, you probably want to go VPS, cloud, or semi-dedicated hosting to ensure it can handle the extra resource consumption. Otherwise on shared hosting, you may end up exceeding your host’s CPU limits.

WooCommerce Cart Fragments

Disable Cart Fragments – cart fragments update the items and total in the cart, but they can take anywhere from 1 second to as long as 10 seconds to load. Your best bet is to disable cart fragments on the homepage + posts, since that’s where they’re not used. Follow that tutorial.

Disable WooCommerce Scripts – WooCommerce can also load around 8 different scripts on your website. To disable these, grab this code from Github and add it to your functions.php file.

Disable WooCommerce Styles – WooCommerce also has styles that load on every single page. Here is a guide for disabling them.

Perfmatters – this nifty plugin by Kinsta makes it easy to disable cart fragments, scripts, and styles. If you want an easy way to disable them without editing code, try this premium plugin.

Clear Customer Sessions – if your WooCommerce site is slow, try clearing customer sessions.

Increase Memory Limit to 256MB – WooCommerce requires you to increase your memory limit to 256MB, but you should really do this for most websites. Here’s a tutorial for doing that.

 

22. Hire Someone Who Knows What They’re Doing

Need help fixing your slow loading website?

I work with a few developers who specialize in WordPress speed optimization. You can check out their portfolio on that page, and I credit them to getting my GTmetrix scores to 100%. Cole manages all speed optimization projects, you can reach him at cole@onlinemediamasters.com.

 

23. Frequently Asked Questions

🚀 What factors have the biggest impact on load times?

Choosing the right hosting, plugins, and cache plugin can have a highest impact on your load times. Optimizing images and avoiding external resources like Google AdSense are also very important. Using a free content delivery network like Cloudflare will also help.

🚀 Which tool is best for testing speed?

GTmetrix has the most robust recommendations out of all speed testing tools. Google PageSpeed Insights is primarily good for 1 thing - measuring server response times.

🚀 How can I tell what's slowing down my website?

GTmetrix tells you which images need to be optimized, whether you're using a CDN, and plugins that may appear multiple times in your report or in your GTmetrix Waterfall. It also measures time to first byte which is a good indicator of whether your hosting is slow.

🚀 What are some lesser-known speed tips?

Many people don't upgrade their PHP version or optimize external resources like Google Fonts and YouTube videos. Lazy load images and videos, and hosting Google Fonts and Google Analytics locally can fix many items in GTmetrix. You should also join Facebook Groups to get unbiased opinions about the best hosting providers, to avoid affiliate traps.

🚀 Which hosting is best?

Cloudways was rated highly in Facebook polls and has a great reputation in Facebook Groups.

🚀 Which cache plugin is best?

WP Rocket was rated the #1 cache plugin in multiple Facebook polls, since it comes with many speed optimization features most cache plugins don't (lazy loading, database cleanup, hosting Google Fonts and Google Analytics locally). You should get optimal results with WP Rocket, otherwise Swift Performance is a good free plugin alternative.

I really hope this tutorial was helpful. If you need help, leave your GTmetrix report in the comments and I’ll hit you up with a few suggestions. Or consider hiring my speed optimizer.

Cheers,
Tom

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