Getting WordPress to work with memcached

WordPress can work with memcached as a cache, and there are plenty of places to find instructions on how to do that.

I referred to Ryan‘s and Mohanjith‘s blog posts that detail this, and after some tweaks to get it up working with the most recent version of WordPress on PHP5, I’ve decided to write some instructions that are a little more recent 😉

1. Install WordPress and memcached. (duh)

Google for instructions on how to do that for your relevant distros, but I won’t be covering that here. I assume that your memcached server is listening on 127.0.0.1:11211.

2. Copy object-cache.php into wp-content folder.

I’ve mirrored Mohanjith’s modified version here. Do remember to rename it to object-cache.php, and make it readable by the PHP user account. Follow this step, I’ve lost my cached one.