As a quick followup to my previous post detailing how to run WordPress behind a Nginx reverse proxy I thought I’d post an interesting graph retrieved from Google Webmaster Tools showing page load times of this site over the past few months:
#wordpress
How to speed up WordPress with Nginx
Recently I’ve wondering whether it was worth trying to improve my WordPress-based blog performance. While it wasn’t particularly terrible, waiting over 2 seconds just to load a single page isn’t exactly stunning.
I took a typical approach and installed the WP Super Cache plugin. Page loads dropped down to ~1 second. Much better, but there must be some more performance gains to be found somewhere without modifying the WordPress source code itself.
Inspired by this post by Mark Maunder I decided to see if I could shoehorn WordPress into a similar reverse proxy/persistent process mould. So far, it works brilliantly.
With the following tweaks I managed to go from 12 requests/s to over 30 requests/s on the same hardware – a single 256MB Rackspace Cloud server – whilst reducing latency from ~2 seconds to an average of only 0.4 seconds.
Blog redesign #4 (and why the WordPress Plugin API needs fixing)
Whilst I was redesigning my blog (what do you think by the way) I decided that what I really needed to finish it off was an ajaxy live search. Now normally I would have looked for a jQuery version, but as I’ve been trying my hand at a bit of MooTools recently I decided to write my own plugin. By the way, if you want to use it on your own site it’s available for download on GitHub.
After a few minutes hacking it together on my local web-server I had a pretty good implementation, even if I say so myself. However, once I’d installed it onto my live server it stopped returning any results. The reason for this? I had WP Super Cache installed on my live server, but not on my local server, and was messing up the JSON output by putting a comment at the bottom. Obviously, the JavaScript function refused to parse it as valid JSON. When I turned WP Super Cache off everything returned to normal.
As a developer this was simple enough to debug and fix, but for the average user who just wants to use WordPress, install some plugins and then start blogging away this incompatibility simply isn’t good enough. Before you know it you’ll end up with your support forums full of posts such as “Your plugin doesn’t work with xxxx, please fix it“, even if you have already stated this issue in your readme and installation guides.