Troubleshooting Guides

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.

By CheckDomainHealth Editorial Team Reviewed by Dionis Ceban Updated Jun 28, 2026 8 min read Beginner

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

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.

Why this matters

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.

  1. Homepage vs inner pages — Confirm whether only posts/pages fail or the whole site is affected.
  2. Permalink settings — Note the current structure in Settings → Permalinks.
  3. Status codes — Test sample URLs with Website Status Checker or curl -I.
  4. Server type — Identify Apache, Nginx or a reverse proxy/CDN in front of WordPress.
  5. Rewrite file — Check whether .htaccess exists and contains WordPress rewrite rules.
  6. Nginx config — Confirm try_files and index.php routing for pretty permalinks.
  7. Document root — Verify the domain points to the correct WordPress installation directory.
  8. 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.

Run Website Status Check →

Common problems

Missing .htaccess rewrite block

High

Apache has no WordPress rewrite rules after migration or manual cleanup.

Next step: Re-save permalinks or restore the standard WordPress .htaccess rules.

AllowOverride disabled

High

Apache 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

High

Nginx does not route unknown paths to index.php.

Next step: Add the standard WordPress try_files configuration.

Wrong document root

High

The 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

Medium

Old URLs no longer match the new structure.

Next step: Create 301 redirects from old URLs to the closest new URLs.

Cached 404 response

Medium

CDN 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

Medium

A 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

Medium

WordPress cannot write updated rewrite rules.

Next step: Fix file permissions or add rewrite rules manually.

Multisite/subdirectory rules missing

Medium

A network or subdirectory install needs different rewrite rules.

Next step: Use the correct WordPress multisite or subdirectory rewrite template.

Custom server rewrite conflict

Low

Manual Apache or Nginx rules override WordPress routing.

Next step: Review custom rewrites and remove conflicting rules.

How to fix permalink 404s

  1. Step 1: Confirm which URLs fail

    Test homepage, one post, one page and one category URL to define the failure pattern.

  2. Step 2: Re-save permalinks

    In WordPress admin, open Settings → Permalinks and click Save Changes without altering structure unless planned.

  3. Step 3: Restore rewrite rules

    Ensure Apache .htaccess or Nginx try_files rules are present and applied by the web server.

  4. Step 4: Verify document root

    Confirm the domain points to the directory containing wp-config.php and index.php.

  5. Step 5: Flush caches

    Purge CDN, object cache, page cache and browser cache after server changes.

  6. Step 6: Test plugin conflicts

    Temporarily disable security, redirect and cache plugins if 404s persist.

  7. Step 7: Add redirects if structure changed

    Map old URLs to new ones with 301 redirects when permalink structure was intentionally changed.

  8. Step 8: Retest public URLs

    Use Website Status Checker to confirm affected URLs now return 200 or the intended redirect.

Examples

Apache .htaccess and Nginx try_files 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.

Use these free tools to verify your configuration after applying changes.

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.

Get Help Run Domain Health Check

Was this guide helpful?

Your feedback helps us improve our guides for everyone.