404 Errors After Updating WordPress Permalinks
Fix WordPress permalink 404 errors caused by missing .htaccess rules, disabled mod_rewrite, Nginx try_files issues, migration problems or plugin conflicts.
Introduction
After updating WordPress permalinks, pages and posts may suddenly return 404 Not Found even though the content still exists in the database. This usually means WordPress changed the URL structure, but the web server is not rewriting requests to index.php correctly.
Permalink 404s are common after migrations, server changes, HTTPS moves, plugin conflicts, or when Apache .htaccess or Nginx try_files rules are missing, overwritten, or blocked. Fixing the issue requires checking WordPress settings, server rewrite configuration, document root, caching and any migration redirects.
Quick answer
If WordPress permalinks return 404, re-save permalinks in Settings → Permalinks, confirm Apache .htaccess or Nginx try_files rewrite rules exist, verify the site uses the correct document root, flush caches, disable conflicting plugins temporarily, and test affected URLs with Website Status Checker.
What permalink 404 errors mean
WordPress pretty permalinks depend on rewrite rules that send requests such as /blog/post-name/ to index.php. When those rules are missing or ignored, the server looks for a real folder or file named blog/post-name and returns 404.
Common causes after permalink changes include:
- missing or unreadable .htaccess on Apache
- AllowOverride disabled so Apache ignores .htaccess
- Nginx config without try_files for WordPress
- wrong document root after migration
- permalink structure changed without redirects
- cached 404 from CDN or page cache
- security plugin blocking rewrite handling
- multisite or subdirectory install using wrong rules
- file permissions preventing WordPress from updating .htaccess
- conflicting custom rewrite rules in server config
If only posts and pages fail while the homepage works, focus on rewrite rules rather than DNS or database content.
Why this matters
Permalink 404s break user navigation, internal links, search results and marketing campaigns. They can also hurt SEO when important URLs stop resolving after a migration or permalink change. Fixing rewrite configuration quickly restores access and prevents unnecessary ranking loss.
Because the content often still exists, permalink 404s are usually a server routing problem rather than lost data. That makes them fixable once the correct rewrite layer is identified.
How to check permalink 404s
Test both WordPress admin settings and public URL responses before changing production configuration.
- Homepage vs inner pages — Confirm whether only posts/pages fail or the whole site is affected.
- Permalink settings — Note the current structure in Settings → Permalinks.
- Status codes — Test sample URLs with Website Status Checker or curl -I.
- Server type — Identify Apache, Nginx or a reverse proxy/CDN in front of WordPress.
- Rewrite file — Check whether .htaccess exists and contains WordPress rewrite rules.
- Nginx config — Confirm try_files and index.php routing for pretty permalinks.
- Document root — Verify the domain points to the correct WordPress installation directory.
- Plugins and cache — Temporarily rule out security, cache and redirect plugin conflicts.
Confirm the 404 pattern
Use Website Status Checker to test homepage, posts and pages and confirm which URLs return 404.
Common problems
Missing .htaccess rewrite block
HighApache has no WordPress rewrite rules after migration or manual cleanup.
Next step: Re-save permalinks or restore the standard WordPress .htaccess rules.
AllowOverride disabled
HighApache is configured to ignore .htaccess, so permalinks cannot work.
Next step: Enable AllowOverride for the site directory or add equivalent server config.
Nginx without try_files
HighNginx does not route unknown paths to index.php.
Next step: Add the standard WordPress try_files configuration.
Wrong document root
HighThe domain points to the wrong folder after migration.
Next step: Point the vhost or hosting account to the real WordPress root.
Permalink structure changed without redirects
MediumOld URLs no longer match the new structure.
Next step: Create 301 redirects from old URLs to the closest new URLs.
Cached 404 response
MediumCDN or page cache stored a 404 before rewrite rules were fixed.
Next step: Purge CDN and WordPress cache after fixing server rules.
Security plugin conflict
MediumA firewall or security plugin blocks rewrite handling or serves stale errors.
Next step: Temporarily disable the plugin and retest permalinks.
File permissions block .htaccess updates
MediumWordPress cannot write updated rewrite rules.
Next step: Fix file permissions or add rewrite rules manually.
Multisite/subdirectory rules missing
MediumA network or subdirectory install needs different rewrite rules.
Next step: Use the correct WordPress multisite or subdirectory rewrite template.
Custom server rewrite conflict
LowManual Apache or Nginx rules override WordPress routing.
Next step: Review custom rewrites and remove conflicting rules.
How to fix permalink 404s
-
Step 1: Confirm which URLs fail
Test homepage, one post, one page and one category URL to define the failure pattern.
-
Step 2: Re-save permalinks
In WordPress admin, open Settings → Permalinks and click Save Changes without altering structure unless planned.
-
Step 3: Restore rewrite rules
Ensure Apache .htaccess or Nginx try_files rules are present and applied by the web server.
-
Step 4: Verify document root
Confirm the domain points to the directory containing wp-config.php and index.php.
-
Step 5: Flush caches
Purge CDN, object cache, page cache and browser cache after server changes.
-
Step 6: Test plugin conflicts
Temporarily disable security, redirect and cache plugins if 404s persist.
-
Step 7: Add redirects if structure changed
Map old URLs to new ones with 301 redirects when permalink structure was intentionally changed.
-
Step 8: Retest public URLs
Use Website Status Checker to confirm affected URLs now return 200 or the intended redirect.
Examples
Apache .htaccess (standard WordPress):
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Nginx server block:
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
}
Example diagnosis:
Homepage:
https://example.com/ → 200 OK
Post URL:
https://example.com/blog/hello-world/ → 404 Not Found
Likely cause:
Rewrite rules missing or ignored.
Fix:
Re-save permalinks, restore .htaccess or add Nginx try_files, then purge cache.
Examples are illustrative. Back up server configuration before editing Apache, Nginx or .htaccess on production sites.
Frequently asked questions
Why do permalinks break after saving settings?
WordPress relies on server rewrite rules. If .htaccess or Nginx try_files is missing or wrong, pretty URLs return 404 even though content exists.
Does clicking Save Permalinks really fix 404s?
Sometimes. It regenerates rewrite rules, but only if the web server allows WordPress to write or apply them.
Can a migration cause permalink 404s?
Yes. Missing .htaccess, wrong document root, Nginx config without try_files, or stale cache after migration are common causes.
Why does the homepage work but posts return 404?
That usually means rewrite rules are not applied for subpaths, which points to Apache/Nginx configuration or missing permalink rules.
Can a security plugin cause permalink 404s?
Yes. Some security, firewall or caching plugins can block rewrite handling or serve cached 404 responses.
Should I change permalink structure during a live migration?
Only if you also plan redirects. Changing structure without redirects creates new 404s and SEO loss.
Are permalink 404s bad for SEO?
Yes. Important URLs returning 404 can reduce crawlability, lose rankings and break internal links.
Related tools
Use these free tools to verify your configuration after applying changes.
Related guides
Browse all Troubleshooting guides →Need help applying this fix?
Send us your domain, report link or issue details. CheckDomainHealth will review the request and route it to the right technical team if hands-on support is needed.
Was this guide helpful?
Your feedback helps us improve our guides for everyone.
Thanks for your feedback!