WordPress Caching Plugins

Tile for WordPress Plugin postsWP Super Cache has long been my “go to” plugin for improving performance of WordPress. But that just changed.

There was an update to WP Super Cache recently and I installed it. I had some time and did some testing beyond making sure the site didn’t break and what I found was that the plugin really wasn’t working. Unfortunately I haven’t been completely testing each and every change to the site. If nothing breaks I consider it good although I hadn’t gone so far as to verify pages were being cached. Somewhere in the past it appears the WP Super Cache plugin stopped caching many pages. I can’t say if it was an earlier upgrade to the plugin or if it was something I added/changed that Super Cache couldn’t handle. It wasn’t the latest update as another of my sites that was still on the older plugin had the same problem.

I spent some time troubleshooting over the course of a couple days, doing the usual things. Google searches, uninstall.re-install, checking logs and so on. The strange thing was that testing worked (mostly) and the logs said things were cached. Some pages were in fact cached while most weren’t. Due to the increasing frustration I turned it off and decided to take a break and return with fresh eyes in a week or so.

Instead I looked for alternatives and found two of them that appear to complement one another.

DB Cache Reloaded

First off is DB Cache Reloaded which takes a different approach to caching in that it caches queries rather than pages. Among other benefits this helps with bots. Bots (such as Google’s search crawlers) traverse the pages, hitting each one just once. A typical page cache, such as WP Super Cache or the next plugin I mention, don’t help with the bots. Well, unless the page was already cached before the bot arrived. Since many WordPress pages make the same database calls DB Cache Reloaded will help reduce the CPU load as the bot traverses the pages since they will make many of the same queries.

DB Cache Reloaded is not going to give the same speed boost as Super Cache or Hyper Cache when feeding a page already cached, but it’s going to reduce CPU and memory load on the server when those bots hit. It’s also going to improve performance for the infrequently visited pages.

With Google now saying they include website speed when ranking search results, the performance that the bots receive is also going to help. DB Cache Reloaded avoids the need to cache every page on the site just to help the bots.

Hyper Cache

Hyper Cache provides the same basic functionality as WP Super Cache with the main difference being it’s easier to configure (needing very little). WP Super Cache has gotten easier to configure over time, and now has an “easy setup” but to get the best performance you need to configure it via .htaccess files. Hyper Cache had the added benefit for me in that it worked on my site.

Hyper Cache won’t be active if you’re logged onto WordPress, so for cache testing you’ll need a second browser that’s not logged in. (Or use Google Chrome’s incognito mode – I assume another browser’s private browsing mode would work too, but haven’t tried anything other than incognito.)

Unlike WP Super Cache my testing shows Hype Cache is working across all my pages.

The Dynamic Duo

The two caching plugins seem like the perfect compliment to one another. DB Cache Reloaded caches the queries which reducing CPU and memory load, even for the bots and for infrequently viewed pages. I actually came across my Super Cache problem when trying the “preload” feature to help the bots. DB Cache Reloaded seems like a better solution, at least for me. For one thing, DB Cache Reloaded uses a lot less disk space since it doesn’t cache each and every page.

Hyper Cache works like Super Cache and provides the more mainstream page caching for the pages that are frequently accessed.

I haven’t come across any problems with either plugin or with them working together. I’m using the default settings for each plugin at this time. I am on the latest WordPress version (3.01) and there may be problems with earlier versions. I’m hoping to get some time to do actual benchmarks but the speed seems good to me. Time will tell.