I have a simple static html site and only want to use WordPress as a blog so I have WordPress installed in a subdirectory at example.local/blog
When I go to example.local/blog I can see the default WordPress page, you know, with the Cactus plant on the table, but if try to load any of the pages, say for instance the default WordPress post, example.local/blog/hello-world/ it doesn’t work it just loads the static index.html that’s sitting in my root. Why?
I checked the site and address url in both the wp-config and the wp-options table using Sequel Pro. I checked the .htaccess file that sits inside /blog and that seams to be fine too…
I followed this thread (linked below), seams like an issue effecting multi sites too. Strangely, switching from Apache to Nginx makes custom permalinks work. For me on the other hand if I switch to Apache, custom permalinks work, but when I switch back to Nginx they’re broken again. Is there any way to get this working with Nginx? Apache is no good for me.
FIX:
I was able to fix this following a video on YouTube titled " NGINX Fix Wordpress Permalink Error!" I can’t advice anyone else do this so make sure you have a backup, but here’s how I did it with the help of the video.
SSH into the site and cd into /etc/nginx/wordpress (I had to do this on another site and for some reason the path was different /etc/nginx/site.conf)
now run the command ‘nano site.conf’
Now above where you can see the line beginning with “location ~* .(?:jpg|jpeg|gif|png|ico|xml)$ …”