Hacker News new | ask | show | jobs
by Udo 4883 days ago
NginX + php-fpm + APC did the trick for me, at one time even in an EC2 Micro instance under heavy load.

There is a very nice hack I applied to my WordPress installs, but it's not for the faint hearted: hack the WP index.php to serve pages directly from Memcache for all non-authenticated GET requests. The beauty of this is that for most requests, the WP environment (which is horribly bloated) does not even get loaded.

It works about an order of magnitude better than all those cache plugins, but the downside is of course that software updates require some special care.

1 comments

You could just pop Varnish cache in front of Wordpress to do the same thing - any unauthenticated GET's will just hit Varnish, and come nowhere near Wordpress itself.

That way you wouldn't need to worry about software updates.

Totally. I guess I could also use some advanced Nginx directive/plugin to do that. The hack is just something that occurred to me spontaneously, it took about 2 minutes to implement, and I didn't even have to install anything :)
You could give these 2 config files a try sometime:

https://github.com/ewanleith/Wordpress-Server-Configuration-... https://github.com/ewanleith/Wordpress-Server-Configuration-...

Basically they make nginx cache itself, which combined with this Wordpress plugin:

http://wordpress.org/extend/plugins/nginx-champuru/

Makes things very minimal, no need for even a dedicated cache :)