A classic WordPress anomaly occurs when your homepage loads perfectly, but clicking on any blog post, custom page, or category yields a cold 404 Not Found error. This almost always indicates that your web server’s URL rewriting engine (Apache mod_rewrite or Nginx) is out of sync with WordPress’s internal rewrite rules.
The 10-Second Fix: Flushing Rewrite Rules
In 90% of cases, simply forcing WordPress to regenerate its internal rewrite cache solves the issue:
- Log in to your WordPress dashboard.
- Navigate to Settings > Permalinks.
- Do not alter any settings. Scroll directly to the bottom and click Save Changes.
- This single click triggers the internal
flush_rewrite_rules()function, writing a fresh ruleset to your.htaccessfile or database.
For Nginx Servers: The Missing try_files Directive
Unlike Apache, Nginx does not use .htaccess. If your Nginx server block is missing the proper routing directive, requests for non-existent files are dropped instead of routed to index.php. Ensure your Nginx configuration includes:
location / {
try_files $uri $uri/ /index.php?$args;
}
Reload Nginx (sudo nginx -s reload) to immediately resolve all 404 errors across permalinks.




