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 traffic spike. If the content on your site goes viral for example, or is posted by an influential person like a politician and you get sudden attention on social media or other channels, the concentrated stream of traffic can bring your site to its knees. 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 is the fastest WordPress cache plugin on the planet? Probably Batcache, a lightning-fast plugin used to speed up the largest WordPress server in the world, WordPress.com.
Now look this graphic by Joe Hoyle comparing Batcache with a different option, such as 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, i response times start to rise to 10, 25, 40 and even 70 seconds . It only happens at the highest levels of traffic, but that's where we want to be, right? We certainly cannot hope to have a good result with some online users. The real remuneration and real earnings are precisely where there are many users online as in our customers where in some cases we have millions of unique visitors per month, up to over 50 million unique visitors per month.
This above concept applies to many popular WordPress cache plugins, such as WP Rocket e W3 Total Cache , which serve web pages using WordPress and its underlying PHP engine. They rely on compression, CSS minification of JS and other techniques to reduce page load time, and this works on a small scale, but suffers when WordPress itself starts choking on big traffic.
What is the orange graph that remains stable even when the number of concurrent users starts to grow significantly? This is a reverse proxy or also known as a Reverse Proxy.
A reverse proxy (in this case Varnish) is an intermediate service that runs independently, not as part of WordPress, and accepts requests to the WordPress server. As a cache plugin, it provides a pre-saved copy of a WordPress response for a limited time called 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 e WP Fastest Cache .
However, there are a number of problems we've seen with static file-based caching plugins:
File system problems - One of the disadvantages of file-based caches like WP Super Cache is that on certain file systems (especially a network file system like NFS) the disk can significantly damage performance when writing / deleting / modifying many files at the same time. This can result in your site not caching data (making it slow) or serving poorly cached data (making it look broken). Varnish keeps the page data cached in RAM, which avoids this problem.
Plug-in 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 done upstream and only individual items are cached. This means that you will remain fully compatible with plugins and dynamic content.
Web server configuration required - Many plug-ins, such as WP Rocket, require specific settings on the web server for the cache to work. In many cases, the webmaster cannot change the web server settings or has a non-Apache web server such as NGINX or GWAN.
Inefficient compression management : Some WordPress cache plugins compress most of your files using GZIP whenever they are 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. The same approach is taken by CDNs. This means that Varnish's compression management is optimized for most users.
No isolation in case of error - Varnish and CDN are able to recognize when something is wrong on your server and help you get through this time by offering slightly more stable (but still functional) content. This can significantly reduce the impact of downtime. Most WP page caching plug-ins do not 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 on 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 o 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 are now convinced that a Reverse Proxy like Varnish and object caching like Memcached / Redis is very important to prepare for large scale traffic. However, creating these things can be a bit complex. Here's where we come!
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 pre-configured and integrated 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.