WordPress permalinks in nginx subfolder

Was having some trouble hosting a wordpress site from a subfolder of the domain, ‘/blog’. The permalinks just would not work until I found this solution:

I only had to adapt it slightly for my situation:

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

I had tried several other solutions but they had results such as losing the css. This worked for me!

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *