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.
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.
How to fix a slow loading website
- Test Your Website In GTmetrix
- Resize Large Images
- Compress Images
- Add Caching
- Upgrade To PHP 8.0
- Check Server Response Times
- Choose The Right Hosting
- Add Cloudflare’s CDN
- Disable Hotlinking
- Minify Files
- Combine Files
- Avoid Heavy Plugins
- Clean Your Database
- Optimize External Resources
- Combine Google Fonts
- Lazy Load Images + Videos
- Avoid Advertisements
- Consider AMP
- Find Slow Pages In Google Analytics
- WordPress-Specific Optimizations
- WooCommerce Optimizations
- Hire Someone Who Knows What They’re Doing
- Frequently Asked Questions
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)
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.
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.
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
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 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:
5. Upgrade To PHP 8.0
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.
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 (i.e. PHP 8.0).
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.
6. Check Server Response Times
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
I use Cloudways is who is #1 in most recent Facebook polls and my TTFB is consistently <200ms. I’m currently on their Vultr High Frequency plan, but DigitalOcean is good too. It’s $10-$13/month, but we’re talking about fast cloud hosting, not cheap hosting with slow TTFBs.
Instead of reading biased reviews, I encourage you to do your own research. Join Facebook Groups and look at polls, migration results, and conversations on “the best hosting” (shown below). Check out Backlinko’s PageSpeed Test where he found SiteGround had a slow TTFB. You already know GoDaddy and EIG brands (Bluehost + HostGator) are not good choices. WP Engine went downhill, Hostinger writes fake reviews, and NameCheap is mainly for domains.
People who moved to Cloudways and posted their results (click thumbnails to enlarge):
Why I use Cloudways:
- My TTFB is consistently <200ms
- The WordPress admin loads instantly
- Easier to pass web vitals on cloud hosting
- Monthly pricing and free 3-day trials are nice
- Server-level caching (Redis makes a big difference)
- They do a free migration and have a migrator plugin
- Support is fast/helpful as reflected in Trustpilot reviews
- Choice of 5 cloud hosts: DO, Vultr, AWS, Google Cloud, Linode
- They have a Cloudways Users Facebook Group to ask questions
- Only major con is no email hosting, but there’s an option for Rackspace
Affiliate Disclaimer – if you sign up for Cloudways with my affiliate link, thank you! Most affiliates recommend things only for commissions but I take mine seriously and support them with evidence. I also donate to GoFundMe campaigns and everything helps. They do free migrations but if you have questions about launching a server or anything else, you can reach out to me by leaving a comment. Cheers to a faster TTFB.
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.
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.
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).
10. Minify Files
Your cache plugin should take care of this (if not, make sure their settings are enabled).
11. Combine Files
Step 2: Copy/paste the contents so they’re all in one file.
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 70+ slow WordPress plugins for the full list.
- AdSense Click Fraud Monitoring
- All-In-One Event Calendar
- Backup Buddy
- Beaver Builder
- Better WordPress Google XML Sitemaps
- Broken Link Checker
- Constant Contact for WordPress
- Contact Form 7
- Contextual Related Posts
- Digi Auto Links
- Disqus Comment System
- Divi Builder
- 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:
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
- Disques – use conditional load.
- Contact Form 7 Asynchronous Loading – load it asynchronously.
- Google AdSense – use Ad Balancer and Cloudflare Rocket Loader.
- Google Analytics – host it locally using WP Rocket or CAOS Analytics.
- Google Maps – only use them on pages where you need them (eg. contact form)
- Google Fonts – combine Google Fonts in WP Rocket, Autoptimize, or try Self-Hosted Google Fonts/OMGF. Or, host fonts locally by downloading them directly from Google Fonts, converting them to web font files in Transfonter, then adding them to your CSS.
- Gravatars – try Optimum Gravatar Cache, FV, Harrys, or WP User Avatar.
- Embedded YouTube Videos – lazy load videos and replace iframes with preview images using WP Rocket (in the media section), or use the WP YouTube Lyte plugin.
- Prefetching – this helps browser anticipate external resources. Copy these common domains to prefetch then paste them into WP Rocket, Perfmatters, or do it manually.
- Selectively load plugins using external scripts – use Asset Cleanup or Perfmatters to disable plugins (especially those with external scripts) from loading on certain content.
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.
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.
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.
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.
20. WordPress-Specifics Optimizations
I’ve already covered quite a few WordPress-specific optimizations, but here are a few more.
- 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.
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 email@example.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.