A brief technical post. In the past week, I’ve offered this advice to a couple of people, so I thought I might as well write it down here, once and for all.
In running WriteToReply, JISCPress and blogs.lincoln, I’ve learned a bit about optimising WordPress’ use of RAM. Basically, the steps I use are:
- wp-super-cache for file caching
- eaccelerator (or xcache – don’t use APC, it doesn’t work with wp-super-cache) for PHP caching
- MySQL usually comes with a number of sample config files (in /usr/share/mysql/) for small, medium, large and huge servers. Try the medium config file and see how you get on. Compare the variables in each file to understand how you can tweak my.cnf. Also, try tune mysql, though this might recommend more resource for optimal performance.
For your comparison, WriteToReply runs on a minimal Ubuntu VPS with 1.5GB RAM and hosts a small Mediawiki site and a WordPress network of 34 live sites. I know from experience that reducing RAM to just 1GB will cause the server to freeze within a matter of hours as it runs out of memory.
Got any tips? I’d love to hear about them. Thanks.