Sometimes a WordPress website may start behaving unexpectedly after a plugin update, theme change, or core update. A common issue is when the homepage loads normally, but individual pages return a 404 error (page not found), even though the content still exists in the admin panel.
This problem is usually related to permalink rules or the .htaccess file, rather than missing content.
Table of Contents
Fix 1: Refresh Permalink Settings

The simplest and most common solution is to refresh the permalink structure.
To do this:
- Log in to your WordPress dashboard
- Go to Settings → Permalinks
- Do not change anything
- Click Save Changes
This forces WordPress to regenerate rewrite rules and often immediately resolves 404 errors on posts and pages.
Fix 2: Restore Default .htaccess Rules
If refreshing permalinks does not solve the issue, the .htaccess file may be corrupted or missing required rewrite rules.
You can fix it manually via FTP by opening the .htaccess file and replacing its contents with the default WordPress rules:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
After saving the file, reload your website and test several internal pages.
Fix 3: Clear Cache
If your website uses caching (for example LiteSpeed Cache or another caching plugin), old cached rewrite rules may still be served.
After fixing permalinks or .htaccess, make sure to:
- Clear your WordPress cache plugin
- Clear server-level cache (if available)
- Test in an incognito browser window
Why This Happens
This issue usually occurs when:
- Permalink structure is changed or reset
.htaccessfile is overwritten or corrupted- Plugin or theme modifies rewrite rules
- Server migration or restore resets Apache rules
- Cache continues serving outdated URLs
Conclusion
Sudden 404 errors in WordPress rarely mean that content is missing. In most cases, they are caused by broken rewrite rules. Refreshing permalinks and restoring .htaccess defaults typically resolves the issue quickly.