I have been dealing with a WordPress site that was consuming a lot of resources on the server on which it is installed. In the course of discussing the problems I was seeing with the web host’s support team, the support representative suggested that I try W3 Total Cache instead of WP Super Cache to see if it improved the site’s loading time and reduced the resource usage for the site.
I have used W3 Total Cache in the past, and what I remember most about it was that I had one text widget which simply would not update on the front end until I deactivated the plugin and activated it once more, but I had already done everything I could think of to optimize this problem site, so I was game. And he got me thinking, which of these caching plugins really works the best?
First, I ran GoDaddy’s P3 (Plugin Performance Profiler) on the site several times to obtain a baseline measure of its performance with WP Super Cache installed and configured as I have described in a previous post on optimizing WordPress. WP Super Cache was set up to use mod_rewrite.
The best results I got using the P3 plugin with WP Super Cache activated looked like this:
Next, I deactivated WP Super Cache, then installed and activated W3 Total Cache.
The web host recommended I configure W3 Total Cache by going to General Settings and enabling “Enable Page Cache,” “Database Cache,” and “Object Cache” and using the drop down to select “Memcached” as the caching method for each of these caches. (Memcached is installed on the server I was working on. If you don’t have Memcached running on your server, this option will be disabled in W3 Total Cache.) I pressed the “Save All Settings” button and moved on to the “Browser Cache” section. There I selected “Set expires header,” “Set cache control header,” and “Set entity tag (eTag).” Finally, I saved the settings again.
After clearing the cache and running P3 with W3 Total Cache enabled several times, my best results looked like this:
I was really surprised by the results. With the glowing recommendation the web host had given me, I really expected W3 Total Cache to outperform WP Super Cache.
My plugin load time with WP Super Cache was 0.243 seconds; with W3 Total Cache, it was 0.407 seconds, and my site load time went from a 0.4 seconds to 0.6, respectively. On the bright side, W3 Total Cache did result in fewer queries, 22 versus WP Super Cache’s 35, but WP Super Cache was still significantly faster. The most disturbing part to me was that W3 Total Cache took up so much load time itself, twice as long as WP Super Cache.
I repeated the comparison on two other sites on the same server and got similar results. The other sites had different plugins installed, but in each case WP Super Cache outperformed W3 Total Cache except on the number of queries. The site load times were all significantly shorter with WP Super Cache.
The Bottom Line
I am not an expert on caching plugins, or caching in general. I have no idea if these results will generalize to all hosts, and certainly they may only show that on this particular web host, with WP Super Cache using mod_rewrite and W3 Total Cache using Memcached, WP Super Cache comes out ahead. Both plugins offer such a variety of configuration options that there may be more–and less–optimal configurations for each, so I’m not sure if this was an apples-to-apples comparison.
Even so, the take-home message for me is that it’s worth doing your own comparison test before committing to one plugin or the other.