4 ms·
If your problem is CPU usage rather than bandwidth overage, consider switching from Apache to nginx. I found my LAMP WordPress blog (hosted on a small VPS and
by mdolon 16y ago
If your problem is CPU usage rather than bandwidth overage, consider switching from Apache to nginx. I found my LAMP WordPress blog (hosted on a small VPS and using W3 Total Cache) was having trouble with concurrent users - traffic spikes would make my CPU usage skyrocket.
I've since switched to nginx and the results have been great under moderate to high traffic, and without the use of any caching plugin.
- kadavy 16y agoI heard that advice about nginx, but was concerned about lack of a mod_rewrite module for smart URL structure. Is there a way to have search-engine-friendly-urls easily with nginx?
- patio11 16y agoNginx configuration is about as powerful as Apache, and personally easier for me to grok, but you have to be able to get past the lack of documentation. Here's the configuration file from my new project -- with the domain name removed. I've marked the magic bits that gets you Wordpress pretty URL compatibility. If you're actually asking about more complicated rewrites, those are all possible too -- look at the Nginx rewrite module docs. http://www.pastie.org/929223 http://www.pastie.org/929223
- kadavy 16y agoThat's a much more attractive configuration file than an Apache one. I see that you're using FastCGI. Something I didn't mention was that I attempted to use FastCGI, but gave up because my memory usage kept snowballing until I had to reboot my server over and over again. I don't know for sure whether it would have made things any faster.
- pierrefar 16y agoUse php-fpm with enginx and you're golden. I ran a website getting millions of requests daily and it worked a treat on a small EC2 instance.
- jf 16y agoDavid, Nginx is awesome.
- kadavy 16y agoNo, you're awesome, Jöel
- IgorPartola 16y agoHere's the simplest way I've found how to do it. There is also a snippet of Nginx config floating out there for enabling SuperCache (and I assume Total Cache would be easy to implement too). I am able to run 8 FastCGI processes + nginx + MySQL (with InnoDB) on a 256MB VPS, but YMMV. Overall, nginx is awesome. http://igorpartola.com/web-development/how-to-set-up-nginx-with-php-on-ubuntu http://igorpartola.com/web-development/how-to-set-up-nginx-w...
- shin_lao 16y agoI recently posted about configuring a BSD machine to run Wordpress on nginx, hope it helps. http://www.bureau14.fr/blogea/index.php/2010/04/setting-up-a-high-performance-wordpress-server/ http://www.bureau14.fr/blogea/index.php/2010/04/setting-up-a...