Nginx Wordpress permalinks

If you are on Apache, with mod_rewrite, Wordpress will automatically add the required rewrite rules to your .htaccess file for permalinks to work. But for nginx, you have to add the rules manually.

Select config on your Nginx node and open nginx.conf under the conf folder.
Add the line "try_files $uri $uri/ /index.php?$args;" to the configuration file in the / location section so it will look like this.


location / {
root /var/www/webroot/ROOT;
index index.html index.htm index.php;
try_files $uri $uri/ /index.php?$args;


Then restart Nginx


Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request



Please sign in to leave a comment.