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.
- Test Your Website In GTmetrix
- Resize Large Images
- Compress Images
- Add Caching
- Upgrade To PHP 8.0
- Check Server Response Times
- Move To Cloud Or LiteSpeed 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
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 28 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. Move To Cloud Or LiteSpeed Hosting
Rocket.net with their free Cloudflare Enterprise will outperform any “mainstream host” since you get 32 CPU cores + 128GB RAM, NVMe storage, Redis, and Cloudflare’s full page caching + Argo Smart Routing. I use them and average a <100ms global TTFB (or click through my posts).
12 things to know about hosting/TTFB
- Hosting is the #1 factor of site speed.
- TTFB is a key indicator of hosting performance.
- TTFB is part of core web vitals and is 40% of LCP.
- TTFB also affects INP (since latency is part of TTFB).
- SpeedVitals tests TTFB in 35 locations – use this tool!
- Test your site 3 times to get accurate numbers in SpeedVitals.
- Doing this ensures your caching and CDN are working properly.
- Check your average TTFB worldwide in your 3rd SpeedVitals test.
- Google flags your TTFB if it’s over 600ms, but under 200ms is better.
- PageSpeed Insights (and other testing tools) only test TTFB in 1 location.
- WP Hosting Benchmark also tests hosting performance (here are my results).
- Combining a good host/CDN is arguably the best way to improve TTFB (using a host with improved specs on top of Cloudflare Enterprise hits 2 birds with 1 stone).
Mainstream hosts (like SiteGround, Hostinger, and WPX) don’t have a lot of CPU/RAM, use slower SATA SSDs, and are shared hosting with strict CPU limits which force you to upgrade plans. Cloud hosting is faster, but Kinsta still uses SATA SSDs with low CPU/RAM, PHP workers, and monthly visits (Redis also costs $100/month). Cloudways Vultr HF is who I previously used, but again, they start with only 1 CPU + 1GB RAM on slower Apache servers, PHP-FPM, and GZIP.
Here are Rocket.net’s:
All plans use 32 CPU cores + 128GB RAM with NVMe (faster than SATA), Redis (better than memcached), LiteSpeed’s PHP, and Brotli (smaller compression than GZIP). They have no PHP worker limits since only about 10% of traffic hits your origin due to their Cloudflare Enterprise.
|SiteGround||Hostinger||Kinsta||Cloudways Vultr HF||Rocket.net|
|Hosting type||Shared||Shared||Cloud||Cloud||Private cloud|
|CPU cores||Not listed||1-2||12||1||32|
|RAM (GB)||Not listed||.768 – 1.536||8||1||128|
|Object cache||Memcached||x||Redis ($100/mo)||Redis (Pro)||Redis|
|CPU limits||Very common||Low memory||PHP workers||Average||None|
Why you need Cloudflare Enterprise
Because you get Enterprise features like 270+ PoPs, prioritized routing, full page caching, HTTP/3, WAF, and image optimization. 3 problems with most CDNs are their small network (PoPs) and no full page caching or image optimization. For example, WP Rocket’s RocketCDN uses StackPath which was removed from cdnperf.com and doesn’t include image optimization with a mediocre Tbps speed of 65+. SiteGround’s CDN only has 14 PoPs. QUIC.cloud CDN (for LiteSpeed) and BunnyCDN are good, but they still don’t beat Cloudflare Enterprise. Sure, you can pay $5/mo for Cloudflare’s APO, but you’re still missing out on all other Enterprise features.
3 popular hosts with Cloudflare Enterprise
Rocket.net’s Cloudflare Enterprise is free, setup automatically, and uses full page caching (unlike Cloudways). And unlike Kinsta’s, Rocket.net has Argo Smart Routing (specifically good for WooCommerce sites), load balancing, and image optimization. Rocket.net CEO Ben Gabler also used to be StackPath’s Chief Product Officer and went as far as building Rocket.net’s data centers in the same locations as Cloudflare’s. And unlike both hosts, Rocket.net doesn’t limit PHP workers (there’s no CPU limits) and monthly visit limits are 10-25 times more than Kinsta’s.
|Cloudflare Enterprise (Kinsta)||Cloudflare Enterprise (Cloudways)||Cloudflare Enterprise (Rocket.net)|
|Full page caching||✓||x||✓|
|Argo smart routing||x||✓||✓|
|Price||Free||$5/mo (1 domain)||Free|
Problems with mainstream hosts
I’ve written some pretty bad reviews about SiteGround’s slow TTFB, CPU limits, and why SG Optimizer does a poor job with core web vitals (they also control several Facebook Groups and threaten to sue people who write bad reviews). Hostinger writes fake reviews and is only cheap because you get less resources like CPU/RAM. Kinsta and WP Engine are way too expensive for how many resources, PHP workers, and monthly visits you get. Along with major incidents like WPX’s worldwide outage and SiteGround’s DNS getting blocked by Google for 4 days (both WPX and SiteGround denied responsibility). One thing is clear: most mainstream hosts appear to be more interested in profits than performance. Please do your own research before getting advice.
Step 1: Create a Rocket.net account and you’ll be prompted to add a coupon. Sign up with coupon OMM1 to get your first month for $1 (renews at $30/mo or $25/mo when paying yearly). If you sign up with my coupon or affiliate links, I get a commission which I seriously appreciate.
Step 2: Request a free migration. They did this the same day and let me review my website before it was launched with no downtime. For the record, their support is better than Kinsta’s and you can reach out to Ben Gabler or his team (via phone/chat/email) if you have questions.
Step 3: Upgrade to PHP 8.1 and ask support to install Redis (they use Redis Object Cache). These are the only things I did since Cloudflare Enterprise and backups are both automatic.
Step 4: Retest your TTFB in SpeedVitals and click through your pages to see the difference. You can also search their TrustPilot profile for people mentioning “TTFB” where they’re rated 4.9/5.
I was previously on Cloudways Vultr HF which was great, but their Cloudflare Enterprise doesn’t use full page caching (yet) and is $5/mo with annoying challenge pages. Even if their Cloudflare Enterprise was identical, Rocket.net still outperforms them with better specs like more CPU/RAM, Brotli, and LiteSpeed’s PHP (plus better support, easier to use, and usually pricing). While Cloudways is a big improvement than most hosts, you’re already spending $18/mo for Vultr HF’s lowest 1 CPU plan with Cloudflare Enterprise. At that point, the extra $7/mo you’d be spending at Rocket.net is worth it. Rocket.net’s dashboard is also much easier.
For small sites on a budget, NameHero’s Turbo Cloud plan is similar to Hostinger between LiteSpeed, cPanel, and pricing. However, NameHero’s Turbo Cloud plan has about 1.5x more resources (3 CPU + 3GB RAM) with NVMe storage. NameHero’s support/uptimes are also better shown in TrustPilot reviews. This is one the fastest setups on a budget… you get a LiteSpeed server + LiteSpeed Cache + QUIC.cloud CDN, and email hosting. The main con is their data centers are only in the US and Netherlands. If these aren’t close to your visitors, make sure to setup QUIC.cloud’s CDN which has HTML caching (ideally the paid plan which uses all 70 PoPs).
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.