Question

Nginx + Wordpress Permalinks issue

Hi all,

having an issue with my pretty permalink and wordpress. I think it’s an issue with my nginx conf.

Homepage works great Article = 404 WP-admin = 404

Here is my conf: https://github.com/stonedb00/stonedb/blob/master/nginx

Maybe someone have a solution.

Thanks a lot


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Seems this question is so common with Wordpress and Nginx and I think cuz so many tutorials online are assuming that you use Apache in backend of your Nginx…

Anyway just simple fix for permalinks is usually the try_files code:

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

See the full Nginx server block examples

https://github.com/littlebizzy/slickstack/blob/master/nginx/default-single-site.txt

Hello, @StoneDB

Did you installed WordPress manually or you’ve followed our tutorial:

https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-lemp-on-ubuntu-18-04

If you believe that the issue is with the nginx configuration file you can use the default nginx configuration file suggested from WordPress support team itself:

https://wordpress.org/support/article/nginx/

Let me know if you have any questions.

Regards, Alex