What this problem is
Homepage works, but posts/pages return 404 Not Found.
Why it happens
- Permalink rewrite rules missing or outdated
- .htaccess not writable (Apache)
- Nginx rules not configured for WordPress permalinks
- Plugin changed rewrite rules
Prerequisites
- wp-admin access (preferred) or FTP access
- Ability to edit .htaccess or server config if needed
Diagnosis
Confirm the 404 affects pretty permalinks (not only one page). Check if switching to Plain permalinks makes it work.
Detailed steps
Step 1) Regenerate permalinks
- Go to Settings > Permalinks.
- Click Save Changes (even without changing anything).
Step 2) Check .htaccess (Apache)
Ensure WordPress rewrite rules exist and the file is writable.
Step 3) Nginx: verify WordPress rewrite block
Ask your host to confirm the correct WordPress try_files rules are present.
Expected results
- Internal pages load normally again
What to do if it fails
- Disable plugins that manage redirects/rewrite rules and test
- Check if a caching layer is serving old 404 responses
Best practices
- After migrations, always re-save permalinks and verify server rewrite config