
Your WordPress posts and pages exist — you can see them in the dashboard — but visitors get a “404 Not Found” page when they try to open them. It is a classic WordPress headache, and it usually appears out of nowhere after an update, a migration, or a settings change. The WordPress 404 error fix is refreshingly simple in most cases: resaving your permalinks solves it about 90% of the time. In this 2026 guide, we cover the six fixes that resolve 404 errors on WordPress posts, pages, and custom post types.
What Causes the WordPress 404 Error?
A 404 means the server could not find a page at the requested URL. When the content clearly exists in your dashboard, the problem is almost always in how WordPress maps URLs to content. The most common causes are:
- Corrupted permalink structure / rewrite rules: The number-one cause (roughly 90% of cases). After a plugin update, theme change, or core update, WordPress’s internal “rewrite rules” — the map connecting URLs to content — get damaged, so existing pages become unreachable.
- Missing or broken .htaccess file: On Apache servers, this file tells the server how to route URLs. Without it, or with a corrupted version, WordPress cannot route any pretty URL to the right page.
- Changed permalink slug: You (or a plugin) changed a post’s slug, so the old URL no longer matches.
- Page deleted without a redirect: The URL points to content that was moved or deleted, with no 301 redirect in place.
- Plugin or theme conflict: An extension that registers custom post types or modifies rewrite rules breaks URL routing — often without flushing rules afterward.
- Migration issues: After moving hosts or domains, old URL references or a missing .htaccess produce site-wide 404s.
How to Fix the WordPress 404 Error
Start with fix 1 — it resolves the vast majority of cases in under a minute:
- Resave your permalink settings. Go to Settings → Permalinks in your WordPress dashboard. Do not change anything — just scroll down and click Save Changes. This forces WordPress to flush and rebuild its rewrite rules, the internal map connecting URLs to content. Visit the broken page again; it should now load. Nothing about your content or design changes.
- Fix or recreate the .htaccess file. If resaving permalinks did not help, connect via FTP or your hosting file manager, find
.htaccessin your site root (enable “show hidden files”), and check its contents. If it is corrupted or missing, replace it with the default WordPress block: the# BEGIN WordPress/# END WordPressrewrite rules. Then resave permalinks once more. More troubleshooting walkthroughs are on the KamiWeb blog. - Check for plugin conflicts. Deactivate all plugins, then check the broken URLs. If they work, reactivate plugins one by one until the 404 returns — that plugin is interfering with rewrite rules (SEO and custom-post-type plugins are frequent offenders). Replace it with a well-maintained alternative from our free WordPress plugins collection.

- Verify the slug and URL. Open the post in the editor and check its permalink slug matches the URL you are visiting. Watch for trailing characters, wrong capitalization, or a slug that changed after a title edit. Fix the link or update the slug.
- Set up 301 redirects for moved or deleted content. For URLs that genuinely no longer exist, install a redirection plugin and point each old URL to its closest replacement — never bulk-redirect everything to the homepage (Google treats that as a soft 404). Prioritize URLs with backlinks or search impressions, which you can find in Google Search Console.
- Reset permalinks in the database (if locked out of wp-admin). If you cannot reach the dashboard, open phpMyAdmin, find the
wp_optionstable, and setpermalink_structureto/%postname%/(or blank for plain links). Then delete therewrite_rulesoption row so WordPress rebuilds it. If your site uses a custom theme, make sure it is solid — browse the KamiWeb themes library for reliable options.
Conclusion
WordPress 404 errors on posts and pages are almost never about deleted content — they are about broken URL routing. Resave permalinks, repair .htaccess, rule out plugin conflicts, and set up proper 301 redirects for genuinely removed pages. Keep an eye on Search Console for new 404s so you can redirect them before they cost you traffic. For more free site-health resources, start at the KamiWeb homepage and explore our free online tools.
