Jul 12, 2016

wordpress permalinks 404 nginx

You're ready to blog.

Your head is full of ideas, words.

You've decided on this awesome (everybody says so, at least) CMS called "Wordpress".

You installed mysql in under 3 minutes flat.

Then you decided Apache web server is for dinosaurs. You're going to use something way cooler called "nginx".

You finally got everything installed and fire up wordpress in the browser.

You log in, you see your blog. Hurray! You're just like the experts.

Then you click on  a link, any link, they all give you an ugly 404 page. What the heck?

This is how I solved it:

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

Go to your `/etc/nginx/sites-enabled/sitename` file and paste that line in the `location /` block

Done.

No comments:

Post a Comment