nginx wordpress permalink

As you are aware nginx don’t read .htaccess rewrite rule nginx has its own rewrite rule. WordPress has already embraced nginx, works with nginx. There will be problems if you enable permalink option in wordpress nginx. Here is the workaround for it.

You can find permalink option at

Login as wordpress admin Click on settings -> permalinks Custom Structure /%postname%/ # This is the one I am using you can opt any other which is given as example in that page.

Now goto wp-content/plugin directory of your wordpress installation



unzip it in the plugin directory
Now go to admin settings and activate this plugin. Permalink should be working now. Mind you if you have installed wordpress on a separate folder your
“location /” in nginx should look something like the below for nginx wordpress permalink

location / { root /home/user/public_html; #replace user with actual username index index.html index.htm index.php; if ($request_uri ~* ^.*/.*$) { rewrite ^/(w*)/(.*)$ /$1/index.php?q=$2 last; break; } }

A working example is this blog itself