Quick fix for WordPress permalinks in Nginx

| 0 comments

Most of the times I use pretty permalinks rather than default. By pretty I mean ‘Post Name’ or ‘Date and Name’.

These permalinks usually don’t work in Nginx unless you insert following line in your ‘location /’ block in nginx configuration file:

try_files $uri $uri/ /index.php?$args;

Final result should look like this:


location / {
try_files $uri $uri/ /index.php?$args;
}

This is very quick little fix. And maybe some of WordPress functionality still won’t work, but I will investigate that further.

Leave a Reply

Required fields are marked *.