Why is your WordPress site showing 404 errors?
A 404 means the server received the request but could not find content at that URL. In WordPress, this happens for five distinct reasons, each with a different fix:
| Cause | Symptoms | Fix |
|---|---|---|
| Broken permalink rewrite rules | All posts/pages 404, homepage works | Resave permalinks |
| Deleted or trashed content | Specific URLs 404 | Restore content or redirect |
| Changed permalink structure | Old URLs 404, new ones work | Set up 301 redirects |
| Plugin conflict with rewrites | 404s started after plugin activation | Deactivate and test |
| Server .htaccess or Nginx config issue | Permalinks save but 404s persist | Fix server configuration |
The first step is always identifying which category your 404 falls into. That determines the fix.
How do you fix 404 errors by resaving permalinks?
This fixes the majority of WordPress 404 issues. When WordPress permalink rewrite rules get corrupted or deleted, the server does not know how to route pretty URLs to the correct content.
Steps:
- Log into wp-admin
- Go to Settings > Permalinks
- Do not change anything – just click “Save Changes”
- Test the URLs that were returning 404
What this does: WordPress regenerates the .htaccess file (Apache) or flushes rewrite rules (Nginx with WordPress-managed config) with the correct URL patterns.
If you cannot access wp-admin (because wp-admin itself is 404ing):
Access your site via FTP/SFTP and check if .htaccess exists in the root directory. If it is missing or empty, create it with these default WordPress rewrite 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
If the file exists but is not writable, check permissions. WordPress needs write access to .htaccess to update rewrite rules. Set permissions to 644.
How do you fix 404 errors from deleted or moved content?
If specific URLs return 404 but the rest of your site works, the content at those URLs was either deleted, trashed, or moved to a different URL.
Check the trash first:
Posts and pages go to trash before permanent deletion. Go to Posts > All Posts > Trash (or Pages > All Pages > Trash). If your content is there, restore it.
If content was permanently deleted:
You have two options:
- Recreate the content at the same URL
- Set up a 301 redirect from the old URL to the most relevant existing page
Setting up 301 redirects:
Using Rank Math (already installed on this site): go to Rank Math > Redirections > Add New. Enter the old URL as the source and the destination URL as the target. Choose 301 (permanent) redirect type.
Or via .htaccess for bulk redirects:
Redirect 301 /old-page-slug/ /new-page-slug/
301 redirects preserve most of the SEO value from the old URL. Google will transfer ranking signals to the new destination within a few weeks.
How do you fix 404 errors after changing permalink structure?
If you changed your permalink structure (e.g., from /2026/05/post-name/ to /post-name/), every old URL is now broken. Google has the old URLs indexed. Backlinks point to old URLs. Bookmarks use old URLs.
The fix: bulk 301 redirects from old structure to new.
For simple structure changes, a plugin like Redirection or Rank Math’s redirect module can handle pattern-based redirects:
- Old:
/2026/05/my-post/→ New:/my-post/ - Pattern:
/\d{4}/\d{2}/(.+)→/$1
Before changing permalinks in the future:
- Export a list of all current URLs (use Screaming Frog or WP All Export)
- Change the permalink structure
- Set up redirects from every old URL to its new equivalent
- Test a sample of redirects to verify they work
- Submit updated sitemap to Google Search Console
Changing permalink structure without redirects is one of the most damaging SEO mistakes I see. A site with 100 indexed pages that all suddenly 404 can lose 50-80% of organic traffic within days.
How do you fix 404 errors caused by plugin conflicts?
Some plugins register custom rewrite rules (custom post types, custom endpoints, portfolio pages, event calendars). When these plugins conflict with each other or with your theme, URLs break.
Diagnosis:
If 404 errors started after activating or updating a plugin:
- Deactivate the most recently changed plugin
- Resave permalinks
- Test the broken URLs
If they work now, the deactivated plugin was the cause. Check for updates, contact the developer, or find an alternative.
Common plugin-related 404 causes:
- Two plugins registering the same URL slug (e.g., both want
/events/) - A plugin registering a custom post type with a slug that conflicts with a page
- WooCommerce shop page slug conflicting with a regular page
- A caching plugin serving stale 404 responses after content is published
For caching-related 404s: clear your page cache and object cache after publishing new content. Some caching plugins aggressively cache 404 responses, meaning a URL that was 404 before you published content continues to serve 404 from cache.
How do you fix 404 errors on an Nginx server?
If your site runs on Nginx (common with managed WordPress hosts like Kinsta, Flywheel, and some WP Engine configurations), the .htaccess file is irrelevant. Nginx does not read .htaccess.
WordPress rewrite rules on Nginx are handled in the server configuration block:
location / {
try_files $uri $uri/ /index.php?$args;
}
If this directive is missing or incorrect, pretty permalinks will 404. On managed hosts, this is configured automatically — contact support if it breaks. On self-managed Nginx, add the directive to your site’s server block and reload Nginx:
sudo nginx -t && sudo systemctl reload nginx
How do you find and fix all 404 errors on your WordPress site?
Fixing individual 404s is reactive. A proactive approach finds all broken URLs before visitors (or Google) hit them.
Tools for finding 404 errors:
- Google Search Console > Pages > Not Found: Shows URLs Google tried to crawl that returned 404
- Screaming Frog: Crawls your site and reports all internal links pointing to 404 pages
- Server access logs: Shows every 404 request with the referring URL
- Redirection plugin: Logs 404 hits in real-time with the URL and referrer
Priority for fixing:
- URLs with backlinks from external sites (you are losing link equity)
- URLs that Google has indexed (they will show as errors in Search Console)
- URLs linked from within your own site (broken internal links hurt UX and crawl efficiency)
- URLs with significant traffic (check analytics for pages returning 404)
Low-traffic 404s from random bot probes (wp-login.php variations, xmlrpc attacks) can be ignored. Focus on URLs that real humans or Google are actually trying to reach.
When do 404 errors indicate a bigger problem?
Occasional 404s are normal — content gets deleted, URLs change, external sites link to wrong paths. But patterns of 404 errors can signal deeper issues:
- Hundreds of new 404s suddenly: Possible permalink structure corruption, .htaccess deletion, or hosting migration issue
- 404s on URLs you never created: Possible hack (SEO spam pages that were indexed, then cleaned)
- Intermittent 404s (page works sometimes, 404s other times): Caching issue or server resource exhaustion
- All custom post type URLs 404: The plugin registering that CPT was deactivated or updated with a breaking change
If you are seeing patterns rather than isolated incidents, the underlying cause needs investigation beyond simple redirects. A WordPress one-time fix can diagnose and resolve systematic 404 issues when the cause is not obvious.
Frequently Asked Questions
Isolated 404s on pages that never had traffic or backlinks have minimal SEO impact. But 404s on previously indexed pages with backlinks waste link equity and crawl budget. Google will eventually drop those pages from the index, and any ranking signals they carried are lost. Redirect valuable 404 URLs to relevant content with 301 redirects to preserve SEO value.
No. Redirecting everything to the homepage is a soft 404 in Google's eyes — they recognize it as unhelpful and may ignore the redirect entirely. Redirect each 404 URL to the most relevant existing page. If no relevant page exists, let it 404 naturally. A genuine 404 is better than a misleading redirect.
Before launching the redesign: crawl the existing site and export all URLs. After launching: set up 301 redirects from every old URL to its equivalent on the new site. Test a sample of redirects. Monitor Search Console for new 404 errors in the weeks after launch.
Systematic 404 issues you cannot resolve?
We diagnose and fix complex permalink, redirect, and server configuration problems.