It appears that after my previous presentation on developer tools at the East Bay WordPress Meetup I’ve found myself doing another presentation, this time about how to make WordPress fly. Like a bat out of hell. That, of course is both a BatCache and a MeatLoaf reference. Pick whichever suits you based on your age category. 🙂
You can download the PDF of the presentation slides here (5.2 MB)
This presentation does NOT cover the regular caching plugins but rather on how you can optimize your server (and your code) to make use of a much higher performant level of caching. I will be very quickly covering the levels of caching supported by WordPress itself (the run-time cache, transient cache, object cache, page cache and fragment cache).
After that a quick introduction to various cloud hosting services such as Linode and Digital Ocean and why you might consider hosting your WordPress sites and applications there. In the process I will show off the difference between a (generally solid and well known) $20/month shared host and a $5/month “droplet” on Digital Ocean, showing the same site and its performance between the two.
Because it’s not just a matter of switching hosts but what you can do on your own virtual instance running in the cloud the remainder of the presentation is all about what you can do, and why, and how, to get that much performance out of a $5/month Digital Ocean “droplet”.
The main area of focus of the presentation is all about opcode caching (OpCache, APC, XCache, etc.) and what it is, how it works, and why you should consider always having opcode caching enabled on your WordPress server if you care about performance. I’ll also briefly cover the Batcache plugin and how it works well with APC.
The next big thing that makes all the difference is dumping Apache and making the switch to Nginx. While this may not be as easy as it should it’s not really that intimidating and there are a few things to know and keep in mind. I’ll also be covering why Nginx is a much better choice if you care about performance without having to spend a lot of extra resources (CPU and Memory) that will drive up your hosting bills.
As an alternative to regular page caching and plugins I’ll be covering Varnish, the reverse proxy. How it works, why it works, and what you should watch out for because Varnish is great but not always and it depends on the situation, your infrastructure, and what exactly you want to cache. After that I’ll spend a little time on Memcached, what it is, why it works, and why it might be a better alternative to creating custom caching routines in your code and relying solely on APC because Memcached can run distributed. Which is especially interesting since hosts like Digital Ocean offer “virtual private networking” (i.e. server interconnects between your “droplets”) at no extra charge.
Interesting thoughts on the APC being available with php6, but god knows when it would happen, anyways im still confused about using memcache or sticking on with varnish. Varnish is great for small sites but for really large dynamic website with limited RAM varnish might be a bad option.