WordPress has been the single best and single worst piece of software for my company. Almost all of the sites that my company operates are powered by WordPress. On one hand, it’s a fantastic content management system that’s easy to setup and upgrade. If there’s something you want to do on your website, chances are, there’s a plugin out there that will do it for you. On the other hand, WordPress can be a major dog. If you have a large number of posts on a site or get a large amount of traffic, WordPress will slow to a crawl without any caching help.
I’ve been using WordPress for about five years now and I’ve experimented with just about every caching plugin that’s out there. I was a long time WP-Cache and WP-SuperCache user. I’ve experimented with Total Cache and a number of other plugins. After a ton of experimentation and trial and error on a site that gets 25,000 page views per day, I’ve come up with a combination of a few plugins that I believe is the best combination of caching for a WordPress site. If you’re a huge site that gets 6 figures of traffic each day, you’ll probably want to look at Total Cache and combine it with a PHP pre-accelerator, but for everyone else, these are three performance optimization plugins you should use:
HyperCache – I’ve recently switched to HyperCache from SuperCache. HyperCache works a lot like SuperCache, but it will cache your pages for days or weeks if you’d like. It also automatically invalidates cached list pages when you publish a new post and invalidates a cached post when it receives a new comment. I’ve found that giving HyperCache a large time-out period (5,000 or 10,000 minutes) will allow basically your entire website to be cached. Not to mention, Hyper Cache is much easier to configure than WordPress.
DB-Cache Reloaded Fix – WordPress has a reputation for not being very efficient with MySQL. For this reason, I believe a database caching plugin is a must. Unlike HyperCache, DB-Cache will cache actual queries performed by your WordPress installation and ease the burden that WordPress puts on MySQL. There’s some debate as to whether or not using this plugin will improve page load time, but I think it’s better to minimize the querying that WordPress does on MySQL.
Note that DB-Cache Reloaded Fix is a branch of DB-Cache Reloaded (no longer maintained), which itself is a branch off DB-Cache (also no longer maintained). Make sure to get “DB-Cache Reloaded Fix” when searching for the plugin.
Bad Behavior – If you have a popular site that’s powered by WordPress , chances are that you’re getting hammered by bots trying to push comment spam onto your website. One of my sites is at the point where it would be receiving 20,000 comments a day if it weren’t for a few anti-spam plugins. Bad Behavior is a plugin that will stop spam bots and misbehaving crawlers in their tracks by automatically rejecting their HTTP requests. Bad Behavior alone isn’t enough to stop WordPress comment spam, but if you add Akismet and Hashcash to the mix, you’re pretty much good to go.