The best caching plugin for WordPress is… no plugin!

Caching WordPress is a must, no doubts about this! It helps to speed up your website, save server resources (which means saving money!) and provide a better experience for your users, which usually love fast loading pages. Playing so important role is no surprise there are over 1.000 caching plugins only in the free WordPress.org repository. Well, let me go straight to the point: the best caching plugin for WordPress is… no plugin!

Caching explained “in plain English”

In order to really understand the benefits of caching a website, we need to have at least a basic understanding about how cache works, and how different levels of cache can play together to provide the best performances.

In simple terms, caching on the web is the process of storing plain data in a temporary memory, to serve them quicker.

Imagine an uncached WordPress page, which has to use PHP to query the data from the DB, then put them together to serve the visitor with the final page, then a cached one, which has all the information ready and only needs to serve it. It’s easy to figure out which one is faster, and most importantly can handle more concurrent connections together.

Caching Definition A nice visual explanation of caching by KeyCDN

Page content can be cached, database queries can be cached, and if you have a CDN (Content Delivery Network) in front of your website, it usually caches content as well as an additional layer.

Even your web browser caches pages automatically. If it did not, you would have to download every page every time you want to view it. Anything that cuts down the amount of repetitive work that a website must do to serve all of its visitors improves its performance.

Your visitors may not consciously note the great experience they enjoy on your site. However, they will be painfully aware of any shortcomings, such as slow loading pages and missing media files.

Cached vs. uncached WordPress

The difference in response speed with caching versus without it can be remarkable. If you search the web, you will find lots of benchmarks related to this topic, like this one by Kinsta, and this more technical one by Plesk. These tests are for sure reliable, but to make things even more tangible, let’s run our own cached vs. uncached performance test.

I used Siteground (affiliate link), a hosting provider with a pretty good and flexible “3 layers” caching system, on a GoGeek plan (shared environment) using a clean WordPress instance with just some dummy data in the database.

I simulated 6000 requests in a range of one minute (100 simultaneous user per seconds) in a range of one minute, and you don’t need to be a sysadmin to note from the pictures that:

  • the cached site is 100% faster! It loads in half of the time compared to the uncached
  • the cached one has 0% of failed requests while the uncached has about 20% failure rate
  • the cached site is stable and behaves in a regular and predictable way, while the uncached does the opposite

Note: properly handling 6K requests in one minute is a huge result for a shared setup!

Siteground cached Siteground cached load test Siteground uncached Siteground uncached load test

When do you need a WordPress caching plugin?

At this point, is reasonable to think that caching can be just “turned-on” as it brings so many benefits, but it doesn’t work this way.

First of all, not everything can be cached. For instance, if you run WooCommerce on your website, there are some pages like cart, checkout and user account that must be uncached to work properly.

Also, caching is strictly related to the web server (the engine) your website runs. So apache and NGINX, the two most popular, will have a different configuration.

And yes, sometimes you need to refresh all the website content and to purge your cache, and of course, every well-designed caching system has to provide a way to clear up the data. A caching plugin ends to be very useful to orchestrate and manage all this kind of operations.

The bottom line is that caching is something strictly related to the server configuration, so the best plugin is the one designed on-purpose, to work on a specific environment. That’s why all the modern WordPress hosting companies, architected a proprietary caching system with their own plugin (sometimes hidden in the must-use section).

Most of “general purpose” caching plugins are also very useful, and they usually go beyond caching and focus on other performance related aspects like Gzip compression, fonts optimization, images optimization, DNS Prefetching and more. But if I have to pick up a favorite solution, I can’t recommend enough to rely on WordPress hosting providers with a built-in cache set up.

Leave a comment

Your email address will not be published. Required fields are marked *