You change your WordPress permalink structure, open a blog post, and see “Page not found.” The homepage may still work, and the post may still be visible in your dashboard.
Start by checking which address fails. A broken new URL can indicate a rewrite or routing problem. An old URL that fails while its replacement works usually needs a redirect.
This guide explains how to fix WordPress 404 errors after changing permalinks, beginning with dashboard checks and progressing to hosting configuration and old-URL redirects. Server-specific steps mainly apply to self-hosted WordPress. On managed platforms, your hosting support team may need to handle them.
Why a Permalink Change Can Lead to 404 Errors
A 404 response means the requested address could not be found. In this situation, it does not by itself establish that your content has been deleted.
WordPress uses rewrite rules to connect readable URLs with the appropriate content. The web server must also route those requests to WordPress. A failure at either stage can leave a published post inaccessible through its new address. Learn WordPress
Changing a post URL also leaves earlier links pointing to the previous location. Restoring routing for the new structure and handling old addresses are separate parts of the repair.
First, Identify Which URLs Are Broken
Open the affected post in the WordPress editor and use View Post to check its current public address. Compare that address with a failing link.
| What you observe | What to check first |
|---|---|
| The new post URL fails, but the homepage works | Rewrite rules and web-server routing |
| The new URL works, but the old URL fails | Redirect from the old address |
| Only one post fails | Publication status, actual slug, and conflicting routes |
| Only products, courses, or another content type fail | The plugin registering that content type and its URL settings |
| The problem disappears when cache is bypassed | Cached error responses |
| Admin pages also fail or the entire site breaks | A broader hosting, URL-configuration, or application problem |
These are diagnostic starting points. Confirm the cause before making configuration changes.
How to Fix WordPress 404 Errors After Changing Permalinks
1. Record the Current Settings and Prepare a Recovery Copy
Take a screenshot of Settings → Permalinks and record the previous structure if you know it.
Save a current backup of the database and site files before changing plugins or server configuration. Download a separate copy of any configuration file you plan to edit.
Collect a few test addresses, including a recent post, an older post, a normal page, and an affected product or other custom content item.
This gives you a consistent way to compare results after each change.
2. Refresh WordPress Rewrite Rules
Open Settings → Permalinks. Confirm that the selected structure is the one you intend to use, then click Save Changes.
WordPress’s documentation notes that visiting this screen itself triggers a rewrite-rule refresh. Saving also confirms the intended settings. You can therefore try this without switching to a different URL structure first. WordPress.org
Retest a current post URL. If it works, check the rest of your sample addresses.
If WordPress displays a message saying it cannot update .htaccess, move to the Apache checks below. Repeatedly saving the settings will not resolve a server configuration that WordPress cannot modify.
3. Clear Cached Error Responses
After refreshing rewrite rules, purge the relevant caches provided by your setup.
- Your WordPress page-cache plugin.
- Your hosting provider’s page cache.
- Your CDN’s cached copy of affected URLs.
- Your browser’s cached response.
Then test while logged out or in a private window.
A private window does not bypass a hosting or CDN cache, so it is useful only after checking those layers too. Cache clearing may remove an outdated error response, but an underlying routing problem still needs correction.
4. Check Apache Rewrite Support and .htaccess
On Apache hosting, WordPress commonly uses .htaccess to handle readable permalinks. WordPress’s troubleshooting documentation also identifies a disabled mod_rewrite module as a possible cause of permalink 404s. Developer.WordPress.org
Use your hosting file manager or SFTP to inspect the correct WordPress installation. The file may be hidden, so enable the display of hidden files.
Check these points with your host if necessary.
- Is the relevant
.htaccessfile present? - Does it contain the appropriate WordPress rewrite block?
- Is Apache configured to permit those rewrite directives?
- Can WordPress update the file when required?
- Is the request reaching the expected site directory?
If the Permalinks screen provides rewrite rules, use the rules generated for that installation. Preserve unrelated hosting, security, cache, and redirect directives.
A basic single-site configuration can differ from Multisite or subdirectory configurations. WordPress publishes separate examples for those arrangements. Developer.WordPress.org
Avoid replacing the entire file with a generic block. If an edit causes a new server error, restore the saved copy and have your host inspect the configuration.
5. Check Nginx Routing With Your Host
Nginx does not read Apache .htaccess files. Its routing is configured at the server level, which WordPress cannot automatically rewrite from the dashboard. Developer.WordPress.org
Ask your hosting provider to verify that requests for WordPress permalinks reach the correct index.php entry point when they do not correspond to an existing file or directory.
Provide the host with a failing new URL, the intended permalink structure, and the results of the earlier checks.
For a subdirectory installation or Multisite network, explicitly mention that arrangement. The correct routing depends on the installation layout.
6. Investigate Plugin and Custom Content Routes
If ordinary posts work but products, courses, listings, or another content type fail, inspect the plugin that provides that content.
Confirm that it is active and that the affected item is published. Review its permalink or URL-base settings and look for collisions with existing page slugs. WordPress documents conflicting custom post type and page names as a possible cause of 404 errors. Developer.WordPress.org
Test suspected redirect, permalink, multilingual, or custom-content plugin conflicts on a staging copy where possible. Make one change at a time.
Deactivating the plugin that registers a content type can itself make those URLs unavailable. Account for that when interpreting the test.
After correcting the configuration, refresh the rewrite rules and test again. Avoid code that flushes rewrite rules on every page load. WordPress describes the operation as expensive and recommends using it only when necessary. Developer.WordPress.org
7. Redirect Old URLs to Their Correct Replacements
Once new URLs work, check links using the previous structure.
For example, suppose a post moved from /2026/10/online-store-backup/ to /online-store-backup/. The old address should take visitors to that same article.
Some old URLs may already redirect automatically, but test them individually instead of assuming every structure change is covered.
For a permanent move, use a permanent server-side redirect, commonly 301, through a suitable WordPress redirect tool or hosting configuration. Google recommends permanent redirects for permanent URL changes. developers.google.com
Create an old-to-new URL mapping before adding rules.
| Old path | New destination path |
|---|---|
/2026/10/online-store-backup/ | /online-store-backup/ |
/2026/09/email-segmentation/ | /email-segmentation/ |
/2026/08/customer-onboarding/ | /customer-onboarding/ |
These are illustrative mappings.
For a small site, individual mappings are often easier to verify. A large site may benefit from carefully tested pattern rules.
Direct each old URL to its corresponding replacement, and avoid unnecessary intermediate redirects. Google’s migration guidance recommends mapping old URLs to new ones and redirecting directly to the final destination. developers.google.com
A blanket redirect to the homepage can leave visitors unable to find the article they requested.
Update Links Within Your Website
After the new structure is working, review internal links that may still use old addresses.
Check navigation menus, buttons, article links, related-content sections, and page-builder templates. Also confirm that your sitemap and canonical URLs reflect the intended addresses.
For example, an Elementor button may contain a manually entered URL that needs updating even when the destination post’s permalink is correct.
For bulk replacements, use a tool designed for WordPress data and test on staging first. Review the exact replacement pattern so you do not unintentionally change unrelated content.
Verify the Fix With More Than a Visual Check
Open your test URLs while logged out. Then use the browser’s Network panel to inspect the main document request, or use an HTTP status checker.
| Test | Expected result |
|---|---|
| Current published post URL | Correct content with a 200 response |
| Old URL for a permanently moved post | Permanent redirect to the matching new URL |
| Redirect destination | Correct content with a 200 response |
| Truly nonexistent URL | A useful 404 page with a 404 response |
| Product or custom content URL | Correct item without a redirect loop |
A page’s appearance alone is insufficient. A normal-looking page can still return an incorrect status.
Review your host’s error logs or 404 logs for continuing failures. If you use Google Search Console, inspect important affected URLs after the repair and allow time for recrawling.
Frequently Asked Questions
1. Why does my homepage work while posts return 404 errors?
The homepage may load through the site’s entry point while readable post URLs rely on routing that is failing. Refresh WordPress rewrite rules, then check the hosting configuration if the problem continues.
2. Will saving permalinks delete my posts?
Saving permalink settings updates URL settings and rewrite rules. It does not normally delete post content.
Changing the structure can change public addresses, so check old links and redirects afterward.
3. Why can’t I find an .htaccess file?
It may be hidden, missing, or unnecessary for your server setup. Nginx does not use Apache .htaccess files. Ask your host which server handles your site before creating or editing one. Developer.WordPress.org
4. Should I change back to my old permalink structure?
If the change was accidental, restoring the exact previous structure may be the appropriate recovery step.
If the change was intentional, fix the new routing and implement the required redirects. Record your settings and test before making another site-wide change.
5. Can permalink-related 404 errors affect search traffic?
Broken content URLs can prevent people and crawlers from reaching pages. For intentionally changed addresses, permanent redirects help communicate the move.
Search results may take time to update, so monitor important pages after the repair. developers.google.com
Conclusion
Begin by testing the current URL from the WordPress editor. Refresh rewrite rules, clear cached errors, and then investigate server routing or content-specific settings according to what still fails.
Once the new addresses work, redirect old links to their matching pages and update internal links. Finish by checking HTTP status codes so you know visitors are receiving the intended content and response.


