Table of contents of the article:
WordPress cache plugins can help your site go faster by improving page load times and your ability to serve much more traffic without performance degradation. But there will come a time when a cache plugin won't be enough.
All it takes is a huge spike in traffic. If your website's content goes viral, for example, or is published by an influential figure like a politician, and you suddenly receive attention on social media or other channels, the concentrated influx of traffic can bring your website to its knees. A huge success can turn into a performance disaster.
This page will answer the following questions:
- Why are WP cache plugins not large enough?
- How do professionals handle WordPress caching?
- What additional tools do they have besides regular cache plugins?
- What benefits can you get from these additional tools?
- How can you get super performance caching built into WordPress?
Note : We are the creators of ManagedServer.it, the high-performance, enterprise-level hosting platform for WordPress. The information below is based on our experience hosting thousands of demanding WordPress sites and helping them scale.
Why caching plugins aren't enough - Check out the reverse proxy
What's the fastest WordPress caching plugin on the planet? Probably Batcache , a blazing-fast plugin used to speed up the world's largest WordPress server, WordPress.com.
Now look at this chart from Joe Hoyle comparing Batcache to a different option, like Varnish.
The green graph shows what happens to this industrial-grade plug-in as well as you increase the
As the load increases to 20, 50, 100, and more concurrent users, response times start to rise to 10, 25, 40, and even 70 seconds . This only happens at the highest traffic levels, but that's where we want to be, right? We certainly can't expect to have a good result with just a few online users. The real rewards and earnings are where there are many online users, like with our clients, where we have millions of unique visitors per month in some cases, up to over 50 million unique visitors per month.
The above concept applies to many popular WordPress caching plugins, such as WP Rocket and W3 Total Cache , which serve web pages using WordPress and its underlying PHP engine. They rely on compression, CSS and JS minification, and other techniques to reduce page load time, which works on a small scale but suffers when WordPress itself starts to throttle high traffic.
What's the orange graph that stays steady even when the number of concurrent users starts to grow significantly? This is a reverse proxy, also known as a Reverse Proxy.
A reverse proxy (in this case, Varnish) is an intermediary service that runs independently, not as part of WordPress, and accepts requests from the WordPress server. Like a caching plugin, it provides a pre-saved copy of a WordPress response for a limited time called the TTL (Time To Live).
The difference is that while caching plugins are driven by the WordPress server, which can tire as the load increases, a tool like Varnish specializes in serving cache requests and can be literally up to 500 times more efficient than a PHP web server, without operating the Webserver in any way, and PHP. A reverse proxy will respond first and foremost and being written in C language oriented to the network and performance the performance will be absolutely fast.
This in fact generates an incredible flat graph as traffic increases to mega-site levels.
Static file based plug-ins compared to Varnish
Some WordPress cache plugins work differently - they save static files of your dynamic WordPress pages and redirect web visitors to those static versions.
This is an approach that bypasses WordPress and the PHP engine and, in theory, can be as fast as Varnish with high traffic volumes. Some examples are WP Super Cache and WP Fastest Cache.
However, there are a number of problems we've seen with static file-based caching plugins:
File System Issues – One of the drawbacks of file-based caches like WP Super Cache is that on certain file systems (especially network file systems like NFS), disk can significantly impact performance when writing, deleting, or modifying many files at once. This can cause your site to not cache data (making it slow) or serve poorly cached data (making it appear broken). Varnish keeps cached page data in RAM, which prevents this problem.
Plugin Incompatibility – Due to the number of different ways data can be rendered/assembled using WordPress, not all plugins can take advantage of different caching solutions and run into compatibility issues. With Varnish, caching is performed upstream and only individual elements are cached. This means you remain fully compatible with plugins and dynamic content.
Required Web Server Configuration : Many plugins, such as WP Rocket, require specific settings on the web server for caching to work. In many cases, the webmaster is unable to change the web server settings or has a non-Apache web server such as NGINX or GWAN.
Inefficient compression management : Some WordPress caching plugins compress most of your files using GZIP each time they're requested. Varnish caches compressed pages and delivers them as-is for web browsers that support GZIP (99%) and decompresses files on the fly, which is less efficient, only for browsers that don't support GZIP. CDNs take the same approach. This means that Varnish's compression management is optimized for most users.
No error isolation – Varnish and CDN can recognize when something is wrong with your server and help you overcome it by providing slightly more stable (but still functional) content. This can significantly reduce the impact of downtime. Most WP page caching plugins don't do this, minimizing web server downtime.
We strongly believe that Varnish is the best option for large-scale WordPress. That's why we have implemented it as part of our WordPress hosting platform.
Object Caching or Object Cache: speeds up dynamic page views
This chart from New Relic shows what can happen when you integrate a tool called Object Cache—a popular tool is Redis . This refers to another aspect of performance at a larger scale: an internal object cache.
An object cache is a way of storing data from the database in memory, to avoid unnecessary queries on the database. WordPress comes with its own internal object cache, but many experts say it's pretty inefficient.
As with reverse proxy, here too using a dedicated external service for object caching can make a dramatic difference, as can be seen in the graph above - more timely database operations that slow down a site can go down almost. to zero.
The most common options for caching external objects are Redis or Memcached (or in the cloud, AWS ElastiCache or Azure Managed Cache), which can significantly speed up execution and reduce DB load.
Managed Server: The Easiest Way to Get WordPress Hosting with Varnish and Integrated Object Caching
We hope you're now convinced that a reverse proxy like Varnish and object caching like Memcached/Redis are essential for preparing for large-scale traffic. However, setting these up can be a bit complex. That's where we come in!
ManagedServer.it is an enterprise-level WordPress hosting service that offers advanced performance and advanced DevOps features, using an automated and preconfigured platform. Among other performance features, we provide integrated and preconfigured Varnish and Redis or Memcached.
So, if you set the
If you demand performance and speed, do not rely on any hosting provider. The biggest sites choose us.