Question

Nginx + Wordpress Permalinks issue

Posted November 11, 2019 1.8k views
Nginx

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

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.

×
2 answers

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

by Justin Ellingwood
WordPress is the most popular CMS (content management system) on the internet. It allows you to easily set up flexible blogs and websites on top of a MySQL backend with PHP processing. WordPress has seen incredible adoption and is a great choice for getting a website up and...

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

Submit an Answer