Nginx vs Lighttpd for WordPress server performance?
Which web server would be more suitable for running a few instances of wordpress?
They are both pretty easy to setup, so I am wondering mostly about performance. Would there be a difference? I think nginx is faster for serving static files.
Solution 1:
I'd go with nginx, because I think it's a better long-term solution than lighttpd, and it's configuration format doesn't make me want to buy up stock in parentheses supply companies. As gekkz says, Wordpress is a dynamic app, so static file serving isn't the best benchmark to be relying on. I'd rate nginx's FastCGI proxying capabilities over lighty's too, though, and it doesn't leak like a sieve. For me, it's RIP lighty all the way these days.
Solution 2:
Nginx is pretty fast for static files, but wordpress isn't all that static, unless you host your own media instead of using free image hosting services, in which case you might see nginx perform better than lighttpd.
Ideally, you would want to set up a caching plugin with your wordpress to decrease the number of DB queries, in which case both of them will be pretty much just as fast.
Solution 3:
Barry Abrahamson says "For dynamic content, all of them are about the same performance-wise. There are some other advantages to using something like nginx + php-fpm. For example, php-fpm allows you to set some wall-clock timers for php processess (as opposed to cpu-time) at which you can either log and/or kill a php process after a certain amount of time. This is helpful for example, when a php process hangs opening a connection to a remote site. Apache + mod_php can’t do this."
http://serverqa.wordpress.com/2009/05/31/ask-your-questions-here/#comment-2