W3 Total Cache Alternatives

Cachify Logo for the post entitled W3 Total Cache plugin alternativesThere is no doubt that W3 Total Cache has so many options to optimize any WordPress site than any other caching plugin. Even if you use all the features it offers there are other ways to achieve the same, manually, with better efficiency and better results.

Additionally, if you have used W3 Total Cache plugin for at least a year, especially on a multisite, you’d know that it is not a perfect plugin. As with any other plugin out there, it has its own bugs, does some nasty things, some unsatisfied users, had some security flaws on some hosts and a lot more. What’s more, it is not actively developed as of now. The latest development log shows that it’s been 5 months since the last commit with the number of unanswered questions growing by every day in the WordPress support forums.

Updates:

The following section assumes you are using a VPS or a dedicated server. Because on a traditional shared host, the options are very limited and the support for caching plugins vary greatly among the hosts. For example, in HostGator sharing hosting, one could hardly use W3TC as there are numerous issues reported by the users so far.

Let’s dive into the alternatives now…

APC (Alternative PHP Cache)

It is by far the easiest way to get started with cache that runs silently on the server. It can be used as the backend for BatCache too. The APC Object Cache Backend plugin is still being actively maintained by Mark Jaquith (just a few hours back, he did a commit in the development version of this plugin). Please note that by default APC is not compatible with suPHP. If your host runs both, make sure APC is working as expected. An easy way to check, if APC is working on your host is by copying apc.php to your WordPress root directory and access it from your primary domain. You can check a lot of things using apc.php such as how much memory is used by APC, the number of hits and misses, etc.

Memcached

If you are running (or can afford) more than one server, then this is what you’d want to consider for distributed caching. Memcached Object Cache plugin does the same job as APC does for Batcache, running as a backend. You can even run in on a single server where suPHP doesn’t let you to use APC. As memcached runs as an independently as a daemon, you may expect better results. Also, you’d have less issues running a memcached server than APC.

Cachify

I love the simplicity of this plugin. It runs smoothly and effortlessly. Most importantly, it doesn’t break anything. :) If you already have APC installed on your server, then this plugin uses APC to cachify your posts and pages. It works completely different from the traditional plugins. That’s why it doesn’t even require you to define the cache in wp-config.php file. You’d sure love it once you set it up. Cachify works effortlessly with Nginx too.

Nginx

Nginx has built-in caching support, acts as proxy cache for static files. Check out how Nginx serves blogs.law.harvard.edu that runs on WordPress multisite. Please note that Nginx doesn’t offer a way to purge the cache like Varnish does. Also there are no bells and whistles in letting Nginx to handle the cache. It only caches the data and then after they expire, it throws the cached data out of its memory. Simple, yet, not recommended for many situations. You may go crazy when the updated post (or style) doesn’t show up for non-logged in users for sometime. :)

Varnish

For best results, I’d recommend Varnish. It may not be easy to set up. But, once it gets going, you wouldn’t believe how efficient it could be. WordPress.com uses Varnish too to cache static files that are stored in Amazon S3 containers. When Varnish is serving the cached content, the user request would never reach the PHP and / or MySQL. Only logged-in users would need PHP/MySQL.

WP-FFPC (WordPress – Fast Full Page Cache)

An innovative plugin from Péter Molnár. It makes use of memcached as the backend and let Nginx serve the cached pages directly from memcached. What an idea! However, I have had a couple of issues making it to work. I solved one of those with the help of the plugin author. One more issue still remains. If you have successfully deployed this in your site, I’m all ears. :)

Mod_PageSpeed

After many months of testing (in beta), mod_pagespeed module for Apache came out with a stable release in late 2012 and became a standard for many web masters who are interested in tweaking the overall performance of most sites, including WordPress powered sites. It offers tons of filters to tweak each part of a site. Though WordPress works very differently, it is still possible to tweak it to work with mod_pagespeed. Check out my upcoming articles on mod_pagespeed! Please be aware that W3 Total Cache plugin and mod_pagespeed work in a very different environment, W3 Total Cache at the application level and mod_pagespeed at the server level.

The future of W3 Total Cache…

Other functions of W3 Total Cache plugin can be done by hand or using other plugins. For example, for minification, there is Better WordPress Minify, for CDN support, you don’t even need a plugin, for browser cache and expires, server level implementations can be used.

Happy Caching! :)

8 Replies to “W3 Total Cache Alternatives”

  1. How does Varnish compare with Xcache? The reason I ask is this blogger http://rk.md/2009/xcache-bluehost/ was able to get Xcache working on bluehost shared servers.

    And two you mentioned that Cpanel is resource hog. Anyway to optimize cpanel, as some features are really nice when it comes to email account management. Hate to have to go of that

    1. Hi Vadim,

      How does Varnish compare with Xcache?

      Thanks for asking this question and that linked article is a great resource.

      As I exclusively work with WordPress and write about WordPress, I did not mention about Xcache forwhich there is no more support available in WordPress by default. On the other hand, memcached and APC have been supported for a long time and we have exclusive and rock solid plugins to make use of any of these. But, if someone has to make use of Xcache, then that person has to rely on W3 Total Cache. The whole point of this post is to recommend alternatives to it.

      Varnish works on top of WordPress. So, it doesn’t need any support built into WordPress. However, the more complex a website is, the more tweaks are needed to make Varnish efficient. :)

      On cPanel, if you have plenty of RAM, it shouldn’t be an issue.

      Thanks again for your time to comment on this (not so) tiny post.

  2. Thank you so much for posting this! We’ve been using W3 Total Cache across 2 VPS servers, multiple client sites and have had nothing but one issue after another even with detailed settings setup.

    We just need something simple that actually works and doesn’t break anything.

    1. Hi Patty,

      Even though, my description of Varnish as an alternative to W3 Total Cache plugin, is overly simplified, I highly recommend Varnish among the alternatives. I already use Varnish in almost every site that I work with. Additionally, it fits well in a multi-server environment.

  3. One thing that W3 Total Cache does well is sync uploaded files with a CDN. Do you have any recommendations on how to replace this functionality of W3TC? You mention that no plugin is necessary, and I’m curious your approach. A cron job and a filter on the $content?

    1. When I wrote this post, I only had origin-pull CDNs in mind. Thanks for the opportunity to clarify my post here.

      In origin-pull CDNs, as you may already be aware, we don’t have to sync any files.

      For origin-push CDNs, it is still possible to sync the files without using W3TC. I do not know any solutions that involve filters in WP. However, there are multiple server-side solutions available. Here is one such example. Personally, I always prefer server-side solutions, so that they run outside WordPress, via cron, without affecting the performance of the site/s.

  4. W3Total Cache works on single installation and on multisite installation. The new version is for as far I can see Multisite Compatible IF you tweak the settings correct. I have it finally working on my network, because WordPress is nothing without W3Total Cache. I have triend Quick Cache and WP Super Cache but it feels incomplete. I use no CDN or Cloud or anything like that. The Settings that I don’t understand I leave them like the Header tags and eTags, it gave some troubles with not showing posts. Even Google Index works just fine with W3Total Cache.

Leave a Reply

Your email address will not be published. We use cookies to prevent spam comments. Required fields are marked *

css.php