Which Is The Best WordPress Caching Plugin?
30 Jul 2020
I’ve talked about how I optimise this site before, but I wanted to do some digging into which is the best WordPress caching plugin. I’ve tested some of the most popular caching plugins available, and decided to write this post with the results.
Testing WordPress caching plugins
Before I get into the results, let’s talk about how I actually went about testing each plugin, so you have an idea of what I tested and how.
My friend and Fosstodon colleague, Matt Cooper, kindly offered to give me a test WordPress site on his shared hosting account with Hostinger. From there I created a 1,200 word post using Lorem Ipsum generated text. I also added a 140KB image as the featured image.
I kept all of the WordPress settings default, except for the permalink structure, which I set to post-name
. All plugins were removed and I used the default Twenty Twenty WordPress theme.
Which WordPress caching plugins were tested?
There are a lot of caching plugins available for WordPress, but for this test I went with the 4 most popular plugins I could find, which are:
- LiteSpeed Cache
- W3 Total Cache
- WP Fastest Cache
- WP Rocket (premium plugin)
I installed each of these plugins in turn, then configured them as best I could. At first I was going to figure out a baseline and configure them all as closely as each other, but I later decided that this was unfair.
We’re looking for the best WordPress caching plugin here, so I wanted to test all the bell and whistles each plugin offers so that I could get a true representation of what they can do to a site’s performance.
How was the testing carried out?
Once I had established which WordPress caching plugins I was going to test, I headed over to GTMetrix to carry out the tests. The server that Matt’s shared hosting account is on is located on the east coast of the US. The closest GTMetrix server is located in Dallas, TX. So I went with that. I also selected Firefox as the test browser.
I tested the same page without WordPress caching so I could get a baseline, then with each caching plugin listed above.
Tests were carried out 6 times for each caching plugin. The first test was ignored, the rationale being that it allowed GTMetrix to generate the cache for the subsequent 5 tests that I ran, which I then took an average of. This, I think, gave a good idea of how the WordPress caching plugins were improving performance.
The results
GTMetrix gives a tonne of data for users to sift though, but I focussed on 3 metrics for my testing:
- Load time in seconds
- Total page size
- Number of requests
AVG Load Time | Page Size | Requests | |
No caching | 2.26 | 194 KB | 9 |
LiteSpeed Cache | 1.36 | 185 KB | 7 |
W3 Total Cache | 1.36 | 195 KB | 7 |
WP Fastest Cache | 1.26 | 195 KB | 8 |
WP Rocket | 1.46 | 185 KB | 6 |
It was great to see that all the caching plugins improved load times. The quickest of which, WP Fastest Cache, knocked a full second off.
I did think there would be more of a difference between the different caching plugins though. I was also really surprised to see that WP Rocket, a premium plugin that costs $45/year, was the slowest.
Having said that, we’re only talking about 2 tenths of a second between the fastest and slowest caching plugins. And when navigating around the test site, I didn’t really notice a difference in load times when using any WordPress caching.
Real world testing
The test site I used was great, and gave me good data, but I wanted to see what these plugins could do with a site that has a lot more to their posts. While 1,200 words and a single image is indicative of many blog posts, I think a post with roughly the same amount of words, multiple images and comments would be a better test.
So I decided to carry out the same tests on one of my posts. My most recent post, Synology vs Nextcloud, seemed a good candidate.
It’s 1,400 words, 3 images and 66 comments (each with an avatar). This means that the WordPress caching has to do a lot more work because it’s loading things like analytics, an advert and commenter avatars. It’s also doing some IndieWeb goodness too.
Results round 2
So I went ahead and carried out exactly the same tests on my Synology vs Nextcloud post. Here’s the results for that post:
AVG Load Time | Page Size | Requests | |
No caching | 1.98 | 2.32 MB | 62 |
LiteSpeed Cache | 1.90 | 2.31 MB | 50 |
W3 Total Cache | 1.64 | 704 KB | 22 |
WP Fastest Cache | 1.64 | 2.31 MB | 53 |
WP Rocket | 1.38 | 961 KB | 20 |
I found these results to be far more interesting. First of all, LiteSpeed Cache and WP Fastest Cache didn’t really manage to reduce the amount of requests, or the page size by much.
I think this is because these plugins didn’t appear to have an lazy loading option for images (not that I could find anyway). So the entire post, all the images, and all the avatars were loaded right away.
Since W3 Total Cache and WP Rocket both support lazy loading, the page size and request numbers were significantly reduced.
WP Rocket managed to reduce the load time most significantly, but even that was only 60ms quicker than with no caching at all. Again, I was expecting the load times to be improved more than this.
Having said that, the server this site runs on is a VPS that’s under resourced, so even without caching, WordPress will still loads fairly quickly. If you want more info on my hosting setup, here’s a post about what it costs me to run this blog, which explains it all.
This time around there was a noticeable difference, I felt, with W3 Total Cache, WP Fastest Cache and WP Rocket. The LiteSpeed Cache and no caching did feel noticeable slower than the rest.
What I have learned
I think the most important lesson I’ve learned from this testing is that caching is not a magic pill that fixes all performance issues. I already have a good quality server, and I optimise this site in a number of ways, not just caching.
So I suppose in hindsight the results aren’t that surprising on my own environment. But I still would have expected more performance to be squeezed out of the shared environment.
I currently pay for WP Rocket, as it’s widely regarded to be the best out there. Although it did get the best speed results of the WordPress caching plugins that I tested on my site, in the real world it didn’t feel any quicker than WP Fastest Cache or W3 Total Cache. Plus, it performed the worst on the shared environment.
My WP Rocket license is due for renewal in April 2021, which is a 3 site license costing $99/year. My initial reaction was to not renew this license and instead move to W3 Total Cache, who also have a premium offering. However, that’s $99/year for 1 site. So I might as well stay put with WP Rocket, especially since it was the fastest in the tests for my site.
What can you take from this post?
Do your own testing! It’s clear from the testing that I’ve done, that the results can vary greatly depending on the environment your site is hosted on.
WP Rocket offers a free trial, so you can still give it a go, but make sure you test other WordPress caching plugins too, as you may be able to gain more performance with one of the free offerings. Not to mention a few dollars too!
Conclusion
I’m really happy with the setup I have, but that’s a result of lots of testing over the years. Some things have worked, some haven’t. I’m glad that my current choice, WP Rocket, ended up being the fastest in my environment, but the free alternatives came very close and were quicker on the shared hosting.
I’m going to be sticking with WP Rocket when my license is up for renewal in April.
Do you use any of the WordPress caching plugins listed in this post, or this there a hidden gem on the WordPress Plugin library that I have missed? If so, why not tell me about it in the comments below.