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)
- Host Google Fonts locally (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)
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!
1. WP Rocket = #1 Rated Cache Plugin
Here are the Facebook polls:
Had to throw this in here :)
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)
WP Fastest Cache (.527)
W3 Total Cache (.619)
My latest Pingdom report with WP Rocket:
2. Install WP Rocket
Rocket Tester – beta testing for new releases.
Rocket Analytics – lets WP Rocket collect data anonymously. This has minimal affect on load times/CPU, but sending data to any external resource means more work for your server.
Clear Cache – do this when you’re dong configuring the WP Rocket settings.
Preload Cache – generates a cache for your homepage and all internal links you use on the homepage. I don’t do this since I have preload set to “automatic” in the preload tab.
Purge OPcache – purges the OPcache which prevents issues when you update WP Rocket, but it’s still displaying the previous version in the WordPress admin.
Regenerate Critical CSS – do this when you make changes to stylesheets, or add/modify custom CSS via the WordPress Customizer (or a plugin).
Mobile Cache – enable caching for mobile devices, but only “create a caching file for mobile visitors” if you are NOT using a plugin to create a mobile site (eg. free version of WP Touch).
Enable Caching For Logged-in WordPress Users – enable if multiple users are logging into your site (eg. bbPress). This gives each user their own cache, otherwise disable it.
Specify Time After Which The Global Cache Is Cleared – leave as the default. If you rarely update your site or have a lot of static content, you can increase this a bit.
5. File Optimization
Minify Files – ideally these should make all “minify” and “combining” items in your Pingdom and GTmetrix report 99 – 100%. Sometimes enabling these can cause issues with your layout (especially CSS and JS) so check a few pages on your site to make sure this doesn’t happen. If it does, find the problematic files and add them to either the exclude CSS or exclude JS option.
Combine Files – just like minify, enable and check your site for errors.
Combine Google Font Files – Google Fonts are often shown in Pingdom/GTmetrix report. This can help, and you can also trying adding them in “Prefetch DNS Requests” in the Preload tab.
Remove Query Strings From Static Resources – In GTmetix you might see “remove query strings from static resources.” This can help, however most query strings are generated by plugins – expand your items in GTmetrix and see what is making it red – it could be a plugin.
Exclude CSS – if for some reason a minification option messes up your site layout, locate the problematic file and add it here. See WP Rocket’s article on resolving issues with minification.
Lazy Load – delays loading of images, iframes, and videos until you scroll down the page and they become visible (test to see if you like it or not). This significantly reduces load times and HTTP requests however the ongoing loading can be annoying especially for long content. This can also be done using other free plugins like Lazy Load and Lazy Load For Videos but WP Rocket does a great job. I have it lazy load for photos since it’s annoying.
You can also disable lazy load on individual pages/posts using the sidebar:
Disable Emojis – these slow down your site. You can also disable these under Settings → Writing → Formatting, then do not convert emoticons.
Embeds – similar to Cloudflare’s hotlink prevention, this prevents sites from embedding your content on their website which sucks up bandwidth and makes your site slower.
WebP Compatibility – disable if you’re not using WebP images or if you’re already using an image optimization plugin to serve WebP images. Otherwise, disable it. WP Rocket will detect if you’re using Imagify, ShortPixel, Optimus, or EWWW to serve WebP images and disables it automatically. That’s because most image optimization plugins already create and serve WebP images for you, so enabling this would cause duplicate functionality. The only time you should enable this is if your image optimization plugin creates WebP images, but doesn’t serve them.
If you want to learn about preloading, WP Rocket has a simple tutorial. Or if you want to dig deeper here is an advanced tutorial which is about WP Super Cache but the same concepts apply. Preload, in somewhat simple terms, is a refresh when the cached pages are all cleared out and refreshed in one go. I would enable it since it improves both website/indexing speed.
Sitemap Preloading – extends the benefit of preload to ALL URLs in your sitemap, not just your homepage and the internal links you use on the homepage. This does not use an external bot like the manual/automatic option… even if the end result is the same. As long as WP Rocket detected your sitemap in “sitemaps for preloading,” there is no need to add it here.
This is what preloading can do for your server:
Prefetch DNS Requests – Luke made an great list of common domains to prefetch including Google Fonts, Analytics, Maps, Gravatars, YouTube, common social sharing plugins, Disqus, and others. Copy and paste this entire list (or just the ones you need) and paste them into the Prefetch field of WP Rocket. This helps browsers anticipate the requests and load them faster.
8. Advanced Rules
The advanced options are mainly for excluding cart and checkout pages in eCommerce sites.
Never Cache URL(s) – if you’re using an eCommerce shopping cart not listed by WP Rocket (see the note they have in this settings), add your cart and checkout pages here. Learn more.
Never Cache Cookies – same principal as previous option only based on cookies.
Never Cache User Agent(s) – prevents Googlebot or other user agents from caching pages.
Always Purge URL(s) – 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 no need for this. But if there are other page’s cache you want cleared when new content is added, add them.
Cache Query String(s) – mainly used to cache search result pages and price filtering pages for eCommerce sites.
Post Cleanup – revisions, auto drafts, and trashed posts can be deleted if you don’t use them. Unless you have old versions of posts (or deleted posts) you would like to use, delete them.
Comments Cleanup – spam and trashed comments can be deleted.
Transients Cleanup – stores data that takes a long time to get (like social counts) so the next time you need it, it returns super fast. But sometimes when transients get expired they stay in the database and should be deleted. WP Beginner has a great explanation of transients.
Database Cleanup – when you delete a plugin it can leave unused tables in your WordPress database, which you can delete.
Automatic Cleanup – schedule WP Rocket to cleanup your database. Weekly is good unless these accumulate quickly (eg. many people work on your site). If you have WP-Optimize or another database cleanup plugin installed, you can delete it since WP Rocket does this for you.
Optimize – click the optimize button when you’re done, just be sure to backup your database especially if it’s your first time doing this.
StackPath’s CDN mirrors your site on 30+ data centers across the world, reducing the geographical distance between your server and visitors. I use both Cloudflare and StackPath since more data centers = faster delivery of your content. This can shave multiple seconds off your load time especially for visitors who (used to be) far away from your 1 origin server. You can use WP Rocket’s CDN tutorial or StackPath’s CDN tutorial, but here’s exactly what to do.
Step 1: Sign up for StackPath (they have a 30-day trial):
Step 2: In the dashboard, click the CDN tab, then create a StackPath CDN Site:
Step 3: Copy CDN URL from StackPath and paste into WP Rocket’s “CDN CNAME(s)” field:
Step 4: In StackPath go to CDN → Cache Settings, then click “Purge Everything”:
Step 5: Exclude Files From CDN – there may be files being served by the CDN you would like to serve locally. Usually these files are parts of plugins designed to disregard cross domain load. To change this, simply add these files or directories into the “rejected files” area of WP Rocket (add one filedirectory per line) which you can use directives to locate WP directories.
Step 6: Run your site in GTmetrix and “content delivery network” should be green in YSlow.
If you expand items in GTmetrix and see it has to do with your CDN, contact StackPath’s support team who should be able to help you fix these. They have outstanding support.
Instead of using the Heartbeat Control plugin, WP Rocket has it built-in.
1. Google Tracking (Improve Browser Caching For Google Analytics) – you may see Google Analytics errors in your speed testing tool. Having WP Rocket host Google Analytics locally should fix these, specifically in GTmetrix under Page Speed → Leverage Browser Caching.
3. Cloudflare – sign up for Cloudflare, add your website, and Cloudflare will run a scan. You will eventually come to a page with your Cloudflare name servers and a link to your API key.
Change name servers in your hosting account to the ones Cloudflare assigned you:
- Global API Key – used to activate Cloudflare in WP Rocket.
- Account Email – same email used in your Cloudflare account.
- Domain – yourwebsite.com
- 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.
4. Synchronize Sucuri Cache – enable if using Sucuri. This will automatically clear Sucuri’s cache whenever you clear WP Rocket’s cache, keeping your content syncronized.
- Sucuri Firewall API Key (For Plugin) – login to Sucuri here, click your site, go to the API tab, then copy your API Key (For Plugin) and paste it into WP Rocket.
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 on the previous version.
14. FAQs / Documentation
I spent many hours digging through their documentation to make sure this tutorial uses the best WP Rocket settings, but they are extremely helpful if you haven’t checked them out.
Tutorials I found the most helpful:
- Getting Started
- My Site Is Broken
- Hosting Compatibility
- Using WP Rocket With A CDN
- Using WP Rocket With Cloudflare
- Resolve 500 Internal Server Error
- Resolving Issues With Minification
- Using WordFence With WP Rocket
- NGINX Configuration For WP Rocket
- Using iThemes Security With WP Rocket
- How To Check If WP Rocket Is Caching Your Pages
15. SiteGround (#1 Host In Facebook Polls)
SiteGround is used by Yoast, myself, and recommended by WordPress. They are #1 in nearly every Facebook poll and give most people significant load time improvements especially if they were using mediocre hosts: GoDaddy, Bluehost, HostGator, InMotion, Dreamhost, EIG.
I use their semi-dedicated GoGeek plan which comes with 4x more server resources than shared hosting. Click through my pages to see how fast they load, check out my GTmetrix report, or see people who migrated and posted new load times. They also do free migrations.
DigitalOcean on Cloudways and Kinsta are also good and start at $10/month and $30/month. Cloudways is more for developers who don’t need cPanel, email hosting, or the support you get with SiteGround. Kinsta is basically what WP Engine used to be (pricey, but awesome). My entire blog is basically dedicated to helping people make their website load faster. I refuse to recommend $2/month hosting since it’s most people’s biggest regret when running a website.
How To Check If Your Hosting Is Slow
Run your site through Google PageSpeed Insights to see if reduce server response time is in your report. Google recommends it should be <200ms. Anything above 1 second is not good. You can also check your TTFB (time to first byte) in GTmetrix’s Timings tab or bytecheck.com.
A few threads:
SiteGround has 3 plans:
Higher plans include more server resources (#1 factor in the WordPress optimization guide). Here’s the full comparison chart, but GrowBig gives you about 2x more server resources than StartUp, and GoGeek is semi-dedicated hosting which gives you even more. GrowBig and up comes with a free migration, staging, advanced caching, and ability to host multiple websites. GoGeek comes with priority support. Their cloud hosting is quite the price jump at $80/month.
You can see this on their features page:
People usually migrate because their speed technology can cut load times in half:
16. My Full WordPress Speed Guide (35+ Tips)
Watch My Video – it’s a 42 minute video, but I cover pretty much everything (timestamps in video description) and you should learn a ton of great information on WordPress site speed:
Image Optimization – you can run any page through GTmetrix and it will show you all unoptimized images but ONLY for that page – so start with the ones that appear on multiple pages. Image can be optimized 3 ways: serve scaled images (resizing images that are too large), specifying image dimensions (adding a width/height in the image’s HTML or CSS), and optimize images (losslessly compressing them using a plugin like Imagify). GTmetrix will tell you the correct dimensions for the first two if you expand them, and these are all high priority items.
For more tips, see my complete guide to WordPress speed optimization.
17. Get Help From My WordPress Speed Optimizer
Still need help with your GTmetrix/Pingdom report? I’ve been working with Pronaya for 7 years (he’s the one who helped me get a <1s load time in Pingdom). You can hire him by creating a profile on 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 firstname.lastname@example.org. He also has a perfect 5 star review on his 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 full WordPress speed guide first.
Here are some reviews on his profile:
So… how are those Pingdom scores looking? Let me know in the comments or tell me if you’re stuck. You also paid for a premium plugin where they offer support (the last and final tab in the WP Rocket settings), so I would use that to your advantage too, or view their documentation.
Otherwise, nice job!
See Also: How I Got 100% Scores In GTmetrix
If you found this tutorial helpful, a share is always appreciated :)