WordPress subdirectory Posts 404 error

I have installed WordPress using Gulshan Kumar guide later I have created another DB and installed WordPress on subfolder. Now everything works fine but the posts are in the subfolder is getting 404 error.

Someone please suggest on this. @GulshanKumar thanks for the guide.

nano /etc/nginx/sites-available/example.com

:point_right: In case of Subdirectory, configure server this way

location /subdirectory {
index index.htm index.html  index.php;
try_files $uri $uri/ /subdirectory/index.php?$args;

This may require little more additional setup. It has been a while since I have tried this subdirectory case. I may not be able to provide additional support without actually looking into server. You need to debug yourself. I am sharing below hints.

Test configuration

nginx -t

Check logs

tail -f /var/log/nginx/error.log

Reload configuration to reflect changes.

service nginx reload
1 Like

Its working Thanks @GulshanKumar

1 Like

Good to know. You’re welcome! :+1:

1 Like