Caching Battle on WordPress: Varnish vs W3 Total Cache vs WP Super Cache

How many seconds do you wait for a website to load before abandoning it? Even if you’re patient, I bet it’s under 10 seconds. Indeed, KISSMetrics found that half of the web users abandon a website that isn’t loaded in 3 seconds. Now assuming that you’re running a WordPress site (because it’s powerful, easy to use and runs 22% of the new domains in the US)…In this article, you’ll see how to varnish Wordpress and shave multiple seconds off your page load time. I am not talking about wood finishing.

Rather, I’m talking about the HTTP accelerator software developed by Poul-Henning Kamp and used by 1/10th of the top 10k websites. Besides Varnish, WordPress has many other stellar cache plugins. But before we perform a cache plugin comparison of the 3 best ones, let’s understand….

Why caching is essential for most kinds of websites?

If your content management system sends the first byte late to your visitors, then you’ve already ruined your first impression.

There’s an easy way to get past this. Don’t make your server assemble your website’s code every time a new visitors lands…

Use caching.

Through it, your users get served the latest version of the page without having to generate it dynamically.

A repeat visitor to your website doesn’t need to be served every element. His browser’s temporary cache memory stores data that can be reused. Imagine the resources your server will save when thousands of visitors are simultaneously browsing your website.

It will improve your site’s loading time and make the user happy with your improved performance.

Now that you understand caching, it’s time to look at the 3 most powerful plugins recommended for WordPress websites. Based on your theme/design and your traffic, one of these plugins should make the cut for your site.

Let’s start with Varnish.

Varnish HTTP Purge

This plugin doesn’t install the web application Varnish on your website. It only sends a PURGE request to the URL of a page/post when they are modified. Which means that it clears the page’s server cache and rebuilds the page.

So the plugin essentially only configures Varnish for a WordPress website.

First, you’ll need to setup Varnish on your server (running on Port 80) and move Apache behind the scenes (on Port 8080).

Once done, every request to your server will pass through Varnish. And if it doesn’t have a cache, Varnish sends a personal request to Apache on port 8080.

Here’s the 3-step process by Digital Ocean to install and configure Varnish with Apache.

Once installed, the second time loading of a page on your website will be much faster for a user.

Next, let’s take a look at W3 Total Cache.

W3 Total Cache

If you’re looking for a robust caching solution that shaves a significant amount of loading time from your website, then this is the right choice for you.

LabSecrets configured W3 Total Cache and even with 30 plugins installed on their shared server they managed to load their website within 2 seconds.

The developers promise a 10x overall improvement in site performance once you’ve fully configured the plugin.

The downside?

It is daunting to setup. You’ll have 16 pages of configuration options to go through! But at the same time, this guarantees you’ll have options that suit your needs.

Rightly so, this is called as a WordPress performance optimization(WPO) framework by the developers (rather than being labeled as a usual plugin).

It’s one of the recommended plugins in the WordPress codex for optimization. It’s very popular among users, with 1 million+ installs.

Here are a few of its features:

  1. Allows CDN integration and exporting of your customized settings (to setup other websites). And it’s compatible with Cloudfare.
  2. GZIP compression for web browser rendering.
  3. It has dedicated pages for setting up different types of caching – browser, page, object, database.
  4. If you feel overwhelmed with the customization options, then the default settings will work fine.
  5. You can also minify HTML, Javascript, and CSS files.

Full Stack Developer Ahmad Awais has used W3TC on 100+ client websites.

And he has seen positive results every single time.

These screenshots show the results you can expect with advanced optimization.

If you want to get your hands dirty on W3TC, then here’s a config guide by Harsh Agrawal from Shoutmeloud.

Now, over to a viable contender, WP Super Cache.

WP Super Cache

If you don’t want to smack your head around code and configuration, then this is the plugin for you. It’s easy to setup with minor configurations – you don’t need to dabble with the .htaccess file.

And it’s one of the most popular optimization plugins among WordPress administrators with over 1 million downloads (also recommended by WordPress codex).

Let me briefly tell you its features:

  1. Delivers static files with mod_rewrite caching, but you can also opt for the usual PHP caching.
  2. Comes with a scheduler to clear the cache of pages and re-cache them at previously designated times.
  3. Has a legacy caching mode for logged in users. Such users won’t get served the supercached files.
  4. It supports Content Delivery Networks (CDN).

Here’s a guide on installing and setting up WP Super Cache.

The downside with WP Super Cache is that many webmasters have reported its compatibility issues with various themes and other plugins. Step carefully or it might crash your website.

OK, so let’s look over what we’ve learned. How do you choose the best plugin for your website?


Leave a Reply

Leave a Reply

Your email address will not be published.

Written by Chintan Zalani

Chintan is an ROI-focused content marketing consultant. Join him at Elite Content Marketer and learn how to grow your business through content.