Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

WordPress is quite a memory hog, and I've been thinking of using nginx rather than apache.

The one major consideration before doing that is if there are any plugins which will stop working. I have tested a few and they seem to work, but I need to find out if there are any which might break.

share|improve this question
"...nginx rather than wordpress." Perhaps you mean "nginx rather than Apache"? –  Grant Palin Aug 13 '10 at 17:26
Thanks Grant. Edited. –  Sudhanshu Aug 13 '10 at 23:26

6 Answers 6

up vote 3 down vote accepted

I unfortnately have no experience with this but evidently it can be done as these articles and plugins address some of the issues:

Also are you familiar with WP Engine WordPress hosting? They are evidently using it in a hybrid form with Apache, probably as a front-end proxy.

Hope these help.

share|improve this answer
Thanks for the links Mike. I've tried a number of plugins with it and it seems to work great! –  Sudhanshu Aug 16 '10 at 12:38

Small world :). You won't see a lot of issues with Nginx and Apache + Wordpress. We use it for our company as well, and we have no problem getting one server to serve 200k uniques/month and over a million pageviews/month for one site. Nginx + W3 Total Cache, you get some very remarkable numbers.

share|improve this answer
Yeah :) Thanks for the update. I've been trying it out myself and looks quite solid! –  Sudhanshu Aug 16 '10 at 12:41

The biggest difference is rewrite rules, but there are plenty of guides out there (such as the ones Mike linked) that provide you with equivalent rewrite rules.

From a plugin perspective, unless the plugin is doing something really crazy, then it shouldn't know the difference. All internal rewrite rules and that sorta stuff is handled at the WordPress level, independently of your HTTPD.

In short, go for it.

share|improve this answer
Thanks Viper. I got a lot of samples of nginx rules to replace the ones for apache. Besides, have been trying writing Nginx's rules myself, and it seems pretty straight forward. So this shouldn't be an issue anymore. –  Sudhanshu Aug 16 '10 at 12:39 - Since version 3.7, WordPress works with nginx. –  Dan Dascalescu Jun 17 at 8:18

Using Nginx will not make Wordpress use less memory. If you're concerned about memory, you can save some server-wise by optimizing your Apache configuration to only load the modules you need and do other configuration that will reduce the memory apache needs.

Next to that, Apache has caching modules as well worth to consider, so to save all memory WordPress would have used when invoked. Since WordPress output get's cached, Wordpress does not need to run any longer and you save the memory.

share|improve this answer
@Krzysiek Dróżdż: You added typos, but you didn't fix them. Names in English have uppercase only on the first letter. Everything else is doing vendor marketing which is not professional in technical writing. –  hakre Dec 16 '13 at 10:30
There is no such thing as "Wordpress". The software we are talking about is called "WordPress" - this is trademark and it's the only proper way to spell it. (If you have some other idea, just take a look at how this site is called ;) ). –  Krzysiek Dróżdż Dec 16 '13 at 10:41
If you use WordPress, you should spell it correctly - and the proper way is WordPress (that's how this software is called). Take a look at the title of this site - is it "Wordpress Answers" or "WordPress Answers"? Also take a look at this poll ( –  Krzysiek Dróżdż Dec 16 '13 at 10:54
Whatever. Write it as you wish, if you're smarter than everyone else... –  Krzysiek Dróżdż Dec 16 '13 at 11:08
So why do you follow this vendor sprak on your blog? You use "WordPress", "GitHub", etc. very often there... ;) –  Krzysiek Dróżdż Dec 16 '13 at 12:01

When WordPress detects that mod_rewrite is not loaded it falls back to pathinfo ie:(/index.php/%postname%/) permalinks in Permalink Settings page. You can use the nginx Compatibilityplugin to force WordPress to use pretty permalinks then add rewrite rules to your nginx server file:

server { server_name;

root /path/to/blog;

index index.php;

location / {
    try_files $uri $uri/ @wordpress;

location @wordpress {
    fastcgi_pass ...;
    fastcgi_param SCRIPT_FILENAME $document_root/index.php;
    include /etc/nginx/fastcgi_params;
    fastcgi_param SCRIPT_NAME /index.php;

location ~ \.php$ {
    try_files $uri @wordpress;
    fastcgi_index index.php;
    fastcgi_pass ...;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include /etc/nginx/fastcgi_params;

share|improve this answer

The docs are written in Russian and somewhat vague. Sometimes you're wondering if the translation is bad or if the docs are just not very explicit in the first place. So finding answers is sometimes time-consuming and/or requires trial-and-error testing.

However, the author seems very engaged with the community, explaining configuration options. And NginX itself gives you some feedback, such as "you can't use this option here."

share|improve this answer
Four years later, Nginx has excellent documentation in English at, and there's a special page on Nginx and WordPress. –  Dan Dascalescu Jun 17 at 8:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.