
When wordpress permalink structure causing 404 errors strikes your site, every post and page shows “page not found” while the WordPress admin area works perfectly. It feels like the whole site vanished, but the content is still safe in the database. Only the URL routing is broken.
This almost always happens after changing the permalink setting, migrating the site, updating a plugin, or moving to a new host. The rewrite rules that translate pretty URLs into database queries go stale or get blocked, so WordPress cannot match the address to any content.
The fixes below start with the one-click solution that resolves most cases, then move through server files, plugin conflicts, slug problems, and database checks. Work through them in order and test your pages after each step.
Table of Contents
- Quick Checks
- Diagnose the Problem
- Fix 1: Resave Your Permalink Settings
- Fix 2: Switch to a Safe Permalink Structure
- Fix 3: Repair the .htaccess File
- Fix 4: Check Nginx Rewrite Rules
- Fix 5: Disable Conflicting Redirection Plugins
- Fix 6: Resolve Slug and Category Base Conflicts
- Fix 7: Fix the Site Address After Migration
- Fix 8: Check File Permissions and mod_rewrite
- What to Avoid
- Frequently Asked Questions
- Conclusion
- Helpful Resources
Quick Checks
- Open any post URL. If posts 404 but wp-admin works, this guide covers your problem.
- Go to Settings, then Permalinks, and click Save Changes without editing anything.
- Test the site in a private window to rule out browser cache.
- Check whether the 404s started right after a migration, host change, or plugin update.
- Confirm the problem affects posts and pages, not just one single URL.
Diagnose the Problem
| Symptom | Cause | Go to Fix |
|---|---|---|
| All posts and pages 404, admin works fine | Stale rewrite rules after a settings change | Fix 1 |
| 404s started right after switching permalink structure | New structure never registered its rewrite rules | Fix 1, Fix 2 |
| 404s started after moving hosts or servers | Missing .htaccess rules or Nginx misconfiguration | Fix 3, Fix 4 |
| Only some posts 404, others load fine | Duplicate slugs or trashed posts holding the slug | Fix 6 |
| 404s plus redirect loops after migration | Wrong site address stored in the database | Fix 7 |
| 404s after installing a redirection or security plugin | Plugin overriding WordPress rewrite handling | Fix 5 |
| Resaving permalinks changes nothing | .htaccess not writable or mod_rewrite disabled | Fix 3, Fix 8 |
Fix 1: Resave Your Permalink Settings
This is the fix that solves the problem most often. WordPress stores rewrite rules in the database, and they can go stale after updates, migrations, or settings changes. Resaving permalinks forces WordPress to rebuild them from scratch.

- In the WordPress dashboard, go to Settings, then Permalinks.
- Do not change any option. Simply scroll to the bottom and click Save Changes.
- WordPress now flushes the old rewrite rules and writes fresh ones.
- Open a post URL in a private browser window to test.
- If the posts load, you are done. The stale rules were the entire problem.
- If nothing changes, the rules may be blocked at the server level. Continue to Fix 3.
Fix 2: Switch to a Safe Permalink Structure
If resaving did not help, the structure itself may be the issue. Some custom structures conflict with page names or taxonomies. Temporarily switching to the plain “Post name” structure and then back can clear deeper rule problems.
- Go to Settings, then Permalinks, and note your current structure.
- Select the “Post name” option, which is the recommended structure for most sites.
- Click Save Changes and test your posts in a private window.
- If posts load with Post name, your old custom structure was conflicting with something. Keep Post name or rebuild the custom structure carefully.
- If posts still 404, switch back to your original structure and save again, then continue to the next fix.
- Avoid structures with heavy date prefixes unless you need them. Simpler structures cause fewer rewrite conflicts.
Fix 3: Repair the .htaccess File
On Apache servers, WordPress writes its rewrite rules into the .htaccess file. If this file is missing, corrupted, or not writable, no amount of resaving permalinks will help. Repairing it restores the rules.

- Connect to your site using FTP or your host’s file manager.
- Open the main WordPress folder and look for the
.htaccessfile. Enable “show hidden files” if you cannot see it. - Download a backup copy to your computer before making changes.
- Check that the file contains the standard WordPress block between the
# BEGIN WordPressand# END WordPressmarkers. - If the block is missing or damaged, replace that section with the default WordPress rules from the official documentation, keeping any custom rules outside the markers.
- If the file does not exist at all, create a blank
.htaccessfile, then go to Settings, then Permalinks, and click Save Changes so WordPress fills it in. - Test your posts again in a private window.
Fix 4: Check Nginx Rewrite Rules
Nginx servers do not use .htaccess files at all. If your host runs Nginx, the rewrite rules live in the server configuration, and a missing try_files directive causes exactly this 404 pattern.
- Confirm with your host whether your server runs Nginx or Apache. This decides which fix applies to you.
- The WordPress location block needs a rule that passes requests to index.php when no file matches, commonly written as a try_files directive.
- Do not edit the Nginx configuration yourself unless you manage the server. One typo can take the whole site down.
- Contact your hosting support and ask them to verify the WordPress rewrite rules are present in your Nginx configuration.
- Mention that pretty permalinks return 404 while wp-admin works. Support teams recognize this pattern immediately.
- After they confirm the rules, clear any server cache and test your posts.
Fix 5: Disable Conflicting Redirection Plugins
Redirection, security, and multilingual plugins can hijack URL handling before WordPress processes the request. If the 404s started after installing or updating such a plugin, it is the prime suspect.

- Deactivate your redirection and security plugins temporarily.
- Clear all caches, then test a post URL in a private window.
- If posts load, reactivate the plugins one at a time to identify the culprit.
- In the conflicting plugin, look for settings about URL rewriting, forced redirects, or 404 handling, and adjust them.
- Check the plugin’s redirect log for rules matching your post URLs. A wildcard rule that is too broad can swallow real pages.
- Keep only one redirection plugin active. Two of them fighting over URLs causes unpredictable 404s.
Fix 6: Resolve Slug and Category Base Conflicts
When only some posts return 404, the problem is usually a slug collision rather than broken rules. WordPress cannot serve a post if its URL is claimed by something else, like a trashed post with the same slug.
- Check your trash for posts or pages using the same slug as the broken ones. Empty the trash or rename the trashed items.
- Look for a page and a category sharing the same slug. For example, a page called “news” and a category called “news” will fight over the URL.
- If you use a custom permalink structure with a category base, make sure the base word does not match any page slug.
- Edit the broken post, change its slug to something unique, update it, and test the new URL.
- Avoid special characters and uppercase letters in slugs. Stick to lowercase words separated by hyphens.
- After cleaning up slugs, go to Settings, then Permalinks, and save once more to refresh the rules.
Fix 7: Fix the Site Address After Migration
After moving a site to a new domain or from staging to live, the old address can linger in the database. WordPress then builds URLs with the wrong domain, and every link 404s or redirects incorrectly.

- In the dashboard, go to Settings, then General, and check the WordPress Address and Site Address fields.
- Both should show your current live domain with the correct http or https prefix.
- If they show the old domain and the fields are greyed out, the values are hardcoded in the wp-config.php file. Edit that file to update them.
- Alternatively, use your host’s migration tool or a reputable search-and-replace plugin to update all old URLs in the database.
- Never run a blind find-and-replace directly on the database without a full backup. Serialized data breaks easily.
- After correcting the addresses, resave permalinks once more and test the site.
Fix 8: Check File Permissions and mod_rewrite
If resaving permalinks never sticks, WordPress may lack permission to write the .htaccess file, or the Apache rewrite module may be disabled. Both stop the rules from ever reaching the server.
- Check that the
.htaccessfile is writable by WordPress. File permissions of 644 usually work. - If WordPress shows a message that it could not update
.htaccess, copy the rules it displays and paste them into the file manually via FTP. - Confirm with your host that the Apache mod_rewrite module is enabled. Without it, pretty permalinks cannot work at all.
- On managed hosting, mod_rewrite is almost always on, so focus on file permissions first.
- After fixing permissions, go to Settings, then Permalinks, and save one final time.
- Test several post and page URLs in a private window to confirm the 404s are gone.
What to Avoid
- Do not keep switching permalink structures repeatedly. Each switch forces search engines to relearn your URLs.
- Do not edit the
.htaccessfile without downloading a backup first. - Do not install a second redirection plugin to “fix” 404s caused by the first one.
- Do not run database search-and-replace without a complete backup.
- Do not use nulled migration or redirection plugins. Get them from official sources only.
- Do not ignore a single 404ing post. One broken slug pattern often means more will follow.
Frequently Asked Questions About wordpress permalink structure causing 404
Why do my posts show 404 but wp-admin works fine?
The admin area does not use rewrite rules, so it keeps working when they break. Your posts rely on those rules to turn pretty URLs into database queries, which is why only the front end 404s.
Will changing permalinks hurt my SEO?
Changing the URL structure changes your URLs, which can temporarily affect rankings until search engines re-crawl. That is why Fix 1 resaves the same structure instead of changing it. Only change structures when necessary, and set up redirects for old URLs.
What is the best permalink structure for WordPress?
The “Post name” structure is recommended for most sites. It creates short, readable URLs and causes the fewest rewrite conflicts with pages and categories.
Why does saving permalinks fix 404 errors?
Saving flushes the stored rewrite rules and regenerates them from your current settings. Stale or corrupted rules are the most common cause of sudden site-wide 404s.
Can a plugin break my permalinks?
Yes. Redirection, security, multilingual, and custom post type plugins all interact with rewrite rules. If 404s appear after an update, test with plugins deactivated.
Do I need .htaccess on Nginx hosting?
No. Nginx ignores .htaccess files completely. The equivalent rewrite rules must be in the Nginx server configuration, which your host manages.
Why does only one post return a 404?
A single broken post usually means a slug conflict. Check the trash for a deleted item with the same slug, and make sure no page or category shares that slug.
Should I use a 404 redirect plugin as a permanent fix?
A redirect plugin is a bandage, not a cure. Fix the underlying rewrite problem first. Use redirects only for genuinely removed content or changed URLs.
Conclusion
A wordpress permalink structure causing 404 errors is stressful, but the content is never lost. Start with the one-click permalink resave, which fixes the majority of cases in seconds. If that fails, work through the server rules, plugin conflicts, slug collisions, and migration leftovers in order. Once your posts load again, leave the permalink structure alone and let search engines settle back into the correct URLs.

[…] the virtual one. URL and address problems often travel with robots.txt confusion, and our guide to WordPress permalink structure causing 404 covers the address side when pages return errors instead of […]
[…] the next checks are the post itself and the registration. For broader address faults, our guide to permalink structure causing 404 errors covers the settings side in more […]
[…] category pages 404 while single posts load fine, our guide to WordPress permalink structure causing 404 covers the deeper permalink […]
[…] permalink structures cause 404s more widely, our guide to WordPress permalink structure causing 404 covers the deeper structure […]
[…] post pages also return 404 errors, the permalink fault is site-wide, and our guide to WordPress permalink structure causing 404 covers the deeper […]