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.
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
- PHP-FPM is running and the
fastcgi_passpath is correct. - Static files are not blocked by a stray rule.
- Save permalinks in WordPress after the server change.
See WordPress Pages Show 404 Not Found (Posts Work, Pages Do Not).
Related guides
- Writing Clear Error Reports: Screenshots, URLs and Steps
- WordPress Tag and Date Archives Duplicate Content: Settings
- WordPress Permalinks Change: Redirect Old URLs and Avoid 404s
- Error Establishing a Database Connection in WordPress: Full Checklist
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.