Guides › WordPress › Site down or error screens

WordPress Pretty Permalinks Work in Settings but Pages 404 on Nginx

On Nginx there is no .htaccess, so the server needs a rule that sends unknown URLs to index.php.

Reference guide. This guide is written from established practice and the official documentation of the tools involved. We have not yet tested every step on a live demo site. Back up your site before you change anything.
Site down or error page

Why

Apache reads .htaccess rules. Nginx does not. Without the right location rule, URLs like /about/ return 404 even though the settings look fine.

The rule

Inside the site's server block, the main location / should contain a line that tries the file, then the directory, then passes the request to WordPress:

try_files $uri $uri/ /index.php?$args;

Reload Nginx after changes. If you are on managed hosting, you cannot edit this yourself: ask the host to apply the standard WordPress Nginx configuration.

Also check

See WordPress Pages Show 404 Not Found (Posts Work, Pages Do Not).

Related guides

Did this solve it? If not, email hello@sitefixlab.org with the exact error text and we will look into it. Try the problem finder.

Last updated 2026-11-21.