I currently work in the hosting industry and as part of my job I have to deal with WordPress on a regular basis and as such I’ve seen how appalling it can be sometimes with regards to page loading times. Given that my content on here doesn’t change all too often, it makes sense to spend the time generating the content only once and serving it to meet multiple requests for the same document. In order to do this one would usually employ some form of caching.

WordPress itself does have the option for multiple caching plugins which integrate nicely but in my experience they still have to pass the request off to a PHP handler which means some processing is still needed to accommodate the request (albeit less than a full page load). For the purposes of this article though, I’m going to assume a generic framework as this technique is not specific to WordPress at all.

There’re a number of software solutions to sit in front of your web server which act as a cache and some of the more notable ones are nginx and varnish and each have their pros and cons (As far as I know, Varnish can’t do native SSL termination yet). For this post though, I’ll be making use of some Apache modules to do the same thing. This was mostly an experiment for myself to see what I could do with it – I’ve found some limitations which as of yet I haven’t been able to work around for lack of knowledge on the inner workings of Apache, but for now It does the job.