One of the problems with WordPress is it’s dynamic page structure requiring a lot of server side CPU power to build each page. This is fine most of the time but if you ever hit the front page of Digg, Stephen Fry Re-tweet you or anything resulting in a traffic spike your site will slow down or maybe even crash as your server can’t handle to load. One way of lightening the load for your server is caching pages as HTML, for this I use and recommend W3 Total Cache.
The settings I use are as follows:
On the general tab I enabled page caching and minify and setting them to disk (enhanced) and disk respectively I also disabled database and object caching. I enabled CDN and choose Rackspace Cloud Files as my CDN type; I also enabled browser caching.
Under page cache I don’t cache for logged in user nether for 404 pages but I do cache the home page and feeds. I added a list of mobile user-agents the the rejected agents list so they can receive an optimised version and not have the mobile site cached and displayed to desktop user. The rest of the settings I left as the defaults.
As I didn’t enable object and database caching on the general settings page I left these settings alone.
For media and other files I set expire (lifetime of 31536000 seconds) cache control (with a policy of cache with validation), eTag and W3 Total Cache headers and again enabled gzip compression.
I left the user agent settings alone
Content Delivery Network
While these settings are optimised for Rackspace Cloud Sites most of them will be fine on almost any hosting environment.
I choose Rackspace Cloud Files for my CDN not to keep everything on one bill but because after testing I found them more consistent then Amazon CloudFront and a little cheaper for large amounts of data especially for older content that is not cached in the CDN edge locations.