Looking for some awesome WordPress speed tips?
These are the same tips I use to get 100% GTmetrix scores on my homepage and <2s load times on nearly every one of my posts. You’ll learn everything from optimizing plugins, images, server response times, CDNs, and external resources like Google Fonts and YouTube videos.
Use GTmetrix as your tool of choice.
It gives accurate load times and has extensive recommendations like which images need to be optimized, which plugins are slowing down your WordPress site, time to first byte, CDNs, etc.
Google PageSpeed Insights is only good for measuring server response times which should be <200ms. Otherwise, it’s pretty useless and there are many articles out there explaining why.
Pingdom is the most accurate tool for measuring load times, but their recommendations aren’t as great as GTmetrix. (for example, it doesn’t say which specific images need to be optimized).
This post you’re reading has a 1.61MB page size, 69 requests, and still loads in about 1s:
If you have questions or need help, drop me a comment or you can also hire my WordPress speed optimizer to help you improve scores + load times with before + after GTmetrix reports.
WordPress Speed Optimization Tips For 2020
- Avoid Known High CPU Plugins
- Don’t Let Plugins Run On Every Page
- Use A Top Rated Cache Plugin
- Upgrade To PHP 7.4
- Optimize External Scripts
- Serve Scaled Images
- Compress Images
- Consider Multiple CDNs
- Make Plugins Load Faster
- Limit Post Revisions + Autosaves
- Block Spam Bots From Hitting Your Site
- Setup Cloudflare’s CDN
- Reduce Server Response Times To <200ms
- Optimize WooCommerce Scripts, Styles, Cart Fragments
- Post Your GTmetrix Report In Facebook Groups
1. Avoid Known High CPU Plugins
“It’s not the number of plugins, it’s the quality,” said everyone
If you’re using any of these slow plugins, consider replacing them with a faster alternative.
*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 GTmetrix Waterfall.
- 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
- Fancy Gallery
- Fuzzy SEO Booster
- Google Analytics
- Google Language Translator
- View Full List Of 65 Slow Plugins
How To Find Your Slowest Plugins
You can either use Query Monitor, or go through your GTmetrix report to see if the same plugin is showing multiple times in your PageSpeed and YSlow tabs. Also check the Waterfall:
2. Don’t Let Plugins Run On Every Page
Asset CleanUp lets you selectively disable plugins + scripts from loading on certain content. For example, you can disable your contact form and rich snippets plugin from loading on content they don’t show on. Or disable your affiliate marketing plugin from loading on pages.
This eliminates unnecessary requests and reduces load times. Asset CleanUp is also easier to use than Plugin Organizer and other plugins with similar functionality. I highly recommend it.
3. Use A Top Rated Cache Plugin
Which cache plugin is best? Look at these Facebook polls:
WP Rocket is usually #1 because it comes with many features most cache plugins don’t (database cleanup, lazy loading images + videos, local fonts + analytics, prefetching, CDN integration) which is why it usually yields better scores + load times than other cache plugins.
That also means if you were to use most other cache plugins, you would need to install about 6 extra plugins, when WP Rocket has these all built-in. If you’re like me, you’d have just 1 plugin.
WP Rocket Features Not Included With Most Cache Plugins:
- Database Cleanup: built-in to WP Rocket, or use WP-Optimize.
- Lazy Loading: built-in to WP Rocket, or use WP YouTube Lyte.
- Heartbeat Control: built-in to WP Rocket, or use Heartbeat Control.
- Local Google Analytics: built-in to WP Rocket, or use CAOS Analytics.
- Local Google Fonts: built-in to WP Rocket, or use either OMGF or SHGF.
- Prefetch DNS Requests: built-in to WP Rocket, or use Pre* Party Resource Hints.
- Facebook Pixel Browser Caching: built-in to WP Rocket (no other plugin does this).
- CDNs: built-in to WP Rocket (both Cloudflare + multiple CDNs), or use CDN Enabler.
Swift Performance Lite is good too, but it’s more difficult to setup and you probably won’t get the same results as WP Rocket. But Swift does come with a plugin organizer which is helpful.
4. Upgrade To PHP 7.4
Upgrading to a higher PHP version is the easiest thing and can make your site 2-3x faster.
All you have to do is login to your hosting account, find the PHP version manager, and make sure you’re on the latest version (check your website after). Some hosts are quicker to release newer PHP versions than others, another reason why you should avoid GoDaddy, Bluehost, and HostGator (both were late to release PHP 7.2 and will likely be stuck there for awhile).
You can use the Display PHP Version plugin to check which PHP version you’re currently on.
5. Optimize External Scripts
External scripts can are anything on your website that create external requests from outsides websites. Embeds are very common (embedded videos, Github code, job postings, even GIFs).
Some scripts can be optimized (hosting fonts + analytics tracking code locally), lazy loading videos, or even clever ways like taking screenshots of Twitter posts instead of embedding them. You can even try caching Gravatars using a plugin or using Disqus conditional load or Perfmatters (created by Kinsta) to optimize WooCommerce scripts, styles, and cart fragments.
Other external scripts are nearly impossible to optimize. I have never seen a site with AdSense have a decent GTmetrix report. High CPU social sharing and commenting plugins will always slow down your site (this ties into choosing lightweight plugins). My suggestion – optimize the ones you can, try to avoid the rest, and whatever’s leftover, make sure you prefetch this list of common domains to prefetch using WP Rocket. But, avoid external scripts whenever you can.
You can host fonts locally using WP Rocket, OMGF, or Self-Hosted Google Fonts. Asset Manager and Autoptimize also have options for this. But the best way to optimize fonts is to host fonts locally. Go to the Google Fonts website and download all fonts you’re using (be as minimal as you can with fonts and weights). Next, convert the fonts to web font files using Transfonter. Upload web font files to the wp-uploads folder, and add the custom font to CSS.
WP Rocket, CAOS Analytics, and the Local Google Analytics for WordPress plugin will fix the “leverage browser caching” error in GTmetrix when using Google Analytics. I use WP Rocket.
Loading Google AdSense asynchronously and Cloudflare Rocket Loader can help optimize Google AdSense, but this is the biggest GTmetrix killer of them all. It’s basically a trade for monetization over performance, and there is little you can do to make AdSense load faster.
Embedded YouTube Videos
If you’re using WP Rocket, they have an option to lazy load videos and replace the iframe with a preview image (making it so videos are only loaded once people click the play button). If you’re not using WP Rocket, WP YouTube Lyte is a good alternative. This can shave multiple seconds off your initial load times and is easy. Many embedded videos can take over 2 seconds.
Embedded Tweets, Facebook, And Instagram Posts
If you embed posts on your website, consider taking screenshots and replacing it with an image (see the reduce server response time section for an example). I used a 2-column layout and took screenshots of Facebook polls. Now, they don’t have to pull requests from Facebook.
If you have lots of comments on your blog, you probably know how much Gravatars and even some commenting plugins can slow down your site. I decided to disable Gravatars since I’m picky about my load times, but you can also try Harrys, FV, and Optimum Gravatar cache. None of those plugins worked for me though. Your other option is to break or hide comments.
Social Sharing Plugins
Social sharing buttons pull external requests from Facebook, Twitter, and other social networks. If your plugin has an option to update “like counts” you can adjust it so they’re not updated as often. Otherwise, I recommend one of these lightweight social sharing plugins:
- Social Sharing Plugin
- Social Media Share Buttons (Mashable)
- Social Sharing For WordPress
- AddToAny Share Buttons
- WP Social Sharing
- Easy Social Share
6. Serve Scaled Images
Serving scaled images means you need to resize large images to be smaller.
GTmetrix tells you which images are too large and the correct dimensions they should be resized to. All you have to do is resize them then replace the old images with the new one.
It’s a good idea to create an image dimensions cheat sheet so you know the dimensions of all your different images. For example, your sliders might be 1024 x 400px while your widget images are 300 x 300px, or your fullwidth blog images might be 680px width (like mine). So before I create any image, I know it has to be resized to those dimensions for it to load fast.
Sample Image Dimension Cheat Sheet:
- Logo: 300 x 100px
- Sliders: 1024 x 400px
- Widgets: 300 x 300px
- Featured post images: 350 x 350px
- Fullwidth blog images: 680px (width)
If you have serve scale images errors, you will need to fix those manually without a plugin. But once you get familiar with sizing your images properly, you should never have that error again.
7. Compress Images
ShortPixel, Imagify, and Smush are 3 top plugins for this.
Install one of those plugins (I use ShortPixel), sign up with an API key, then bulk compress all images on your site. Of course, you should check your settings, test a few images, and backup your images before bulk optimizing. Even if plugins say “lossless” there is almost always a small quality drop. This is a photographer’s dilemma – if speed is more important, do it. If not, don’t!
8. Setup Cloudflare’s CDN
There’s no reason not to use Cloudflare’s free CDN.
It hosts your website on 200+ data centers, makes it more secure, and has tons of features inside their dashboard. If you haven’t setup Cloudflare and changed nameservers, I’d do that.
If you already have Cloudflare, here are a few extra speed optimizations:
- Setup Page Rules to save bandwidth and secure your wp-admin
- Configure Cloudflare’s speed settings to get the most out of their service
- Enable Hotlink Protection to prevent people from using image bandwidth
- Let your cache plugin take care of minification, then disable it in Cloudflare
9. Consider Multiple CDNs
Multiple CDNs = more data centers = faster delivery of your content.
I use both Cloudflare and StackPath. Smaller websites should be fine with just Cloudflare, but if you’re serious about speed I would consider an additional CDN. StackPath has excellent support and they will help configure the optimal settings if requested. KeyCDN is good too.
With other CDNs besides Cloudflare, they will generate a CDN URL which you will paste into your cache plugin (most cache plugins have a CDN URL field) or use the CDN Enabler plugin.
10. Make Plugins Load Faster
We all know plugins can destroy GTmetrix scores, so here are some tips for optimizing them.
- Avoid high CPU plugins: avoid this list of slow plugins. Common slow plugins include social sharing plugins, portfolios, slider, statistics, backups, and others.
- Replace high CPU plugins with faster plugins: some research will be required, but replace any of your high CPU plugins with faster, more lightweight plugins.
- Delete plugins you don’t need: can you replace plugins with code (eg. insert GA tracking code directly, use Facebook widgets instead of plugins, or create a table of contents in HTML + CSS? Any plugins you can replace with code, do it.
- Don’t use JetPack for a couple modules: first, disable all modules you’re not currently using in the debug settings. Next, do you really need JetPack if you’re only using it for a couple things? It’s infamous for slowing down sites. You’re betting off finding a non-bloated plugin that only does the same functionality.
- Find your slowest plugins: use the GTmetrix Waterfall tab or Query Monitor (the queries by components tab) to see your slowest plugins. If a plugin shows multiple times in your PageSpeed + YSlow report, that may also be an indictor.
11. Limit Post Revisions + Autosaves
By default, WordPress automatically saves each post revision, and also continuously saves drafts when editing them. Saving drafts can be a waste of server resources, and storing thousands of post revisions can bloat your database, so we’ll at least tweak these settings.
Add this to your wp-config.php:
define('AUTOSAVE INTERVAL', 5);
You can also disable autosaves and limit post revisions using Perfmatters or Clearfy.
12. Block Spam Bots From Hitting Your Site
Spam bots are a waste of server resources.
They hit your site repeatedly and consume server resources, without any benefit. And without checking whether they’re hitting your site (use Wordfence), you wouldn’t know they’re there.
Step 1: Find spam bots using Wordfence’s live traffic report. If you see the same bot constantly hitting your site, Google it’s hostname and see if other people have reported it as spam. Googlebot and other legitimate bots are obviously fine, but bots like amazon.aws and linode have been reported as problems. These 2 bots were hitting my own site nearly every second!
Step 2: Block spam bots using Cloudflare Firewall Rules, BBQ, Blackhole, or Wordfence. I would personally use Cloudflare’s firewall rulers if you only have a few primary spam bots to block, since Wordfence itself can cause high CPU. To review, find the spam bots in Wordfence, block the spam bots using Cloudflare, then delete Wordfence so it’s doesn’t consume CPU.
13. Reduce Server Response Times To <200ms
Your server (hosting) is the #1 factor in the WordPress optimization guide.
Hosting recommendations are usually garbage.
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).
Here’s what happened when I moved:
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.
The evidence is there:
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.
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.
14. Disable WooCommerce Scripts, Styles, Cart Fragments
This is partially because WooCommerce adds scripts, styles, and cart fragments to every single page on your site (even non-eCommerce pages). Just like you shouldn’t let some plugins run on every page (tip #2), you shouldn’t let WooCommerce options run on non-eCommerce pages. You can disable all these in 1-click using the Perfmatters plugin by Kinsta (which also lets you selectively disable plugins/scripts), otherwise you can use these codes from Github.
Disable WooCommerce Scripts:
Disable WooCommerce Styles: see Woocommerce’s documentation.
Disable WooCommerce Cart Fragments:
15. Post Your GTmetrix Report In Facebook Groups
If you still need help, there are Facebook Groups where people are happy to provide feedback. Feel free to also leave me a comment, check out my full WordPress speed guide, or hire my team for WordPress speed optimization who will send you before and after GTmetrix reports.
Recommended Facebook Groups
Hope this was helpful.