How to Fix WordPress 404 Not Found Error and Broken Permalinks (2026 Guide)
Have you ever opened a WordPress post or page only to see 404 Not Found instead of the content you expected?
Sometimes your homepage works perfectly, but every blog post returns a 404 error. Other times, only a few pages stop working after a website migration, plugin update or permalink change.
This is a common WordPress problem, and it doesn’t always mean your content has been deleted.
To fix a WordPress 404 error, start by checking whether the page exists, resaving your permalink settings, and reviewing your website’s rewrite rules. If the problem continues, investigate redirects, plugins, server configuration and recent website changes.
In this guide, we’ll explain what causes WordPress 404 errors and how to fix them safely using WordPress and cPanel.
What Does 404 Not Found Mean in WordPress?
An HTTP 404 status code means the server couldn’t find a resource matching the requested URL.
For example, someone might visit:
https://example.com/my-blog-post/
But instead of displaying the article, WordPress returns a 404 page.
This can happen when:
- The page has been deleted.
- The URL has changed.
- WordPress permalink rules aren’t working.
- The website has incorrect rewrite configuration.
- A plugin has modified URL handling.
- A migration has changed the website structure.
A 404 error is different from a 403 Forbidden error or a 500 Internal Server Error.
A 403 means access is refused, while a 500 indicates a server-side failure.
Why Are My WordPress Pages Showing 404 Errors?
The most common causes include:
- Broken permalink settings
- Missing or incorrect
.htaccessrewrite rules - Deleted or unpublished pages
- Changed post URLs
- Incorrect redirects
- Plugin conflicts
- Website migration problems
- Incorrect WordPress site URLs
- Web server rewrite configuration problems
- Incorrect custom post type settings
The correct fix depends on whether the problem affects one page or your entire website.
1. Check Whether the WordPress Page Still Exists
Before editing configuration files, confirm that the affected page or post still exists.
Log in to your WordPress dashboard and open Posts → All Posts or Pages → All Pages.
Search for the affected content and check whether it’s published, drafted, private or in the trash.
If the page was deleted intentionally and has no suitable replacement, a genuine 404 response may be correct.
If the content moved to another URL, consider redirecting the old URL to the new one.
2. Resave Your WordPress Permalink Settings
One of the easiest ways to fix broken WordPress permalinks is to resave your permalink settings.
WordPress uses permalink rules to generate readable URLs.
For example:
https://example.com/wordpress-hosting-guide/
If the rewrite configuration becomes outdated, WordPress may fail to locate otherwise valid pages.
How to Fix Broken Permalinks
- Log in to your WordPress dashboard.
- Navigate to Settings → Permalinks.
- Review your current permalink structure.
- Leave the existing structure selected.
- Click Save Changes.
- Test the affected pages.
This may regenerate the relevant rewrite rules.
Important: Don’t change your permalink structure unnecessarily on an established website. Changing URLs without proper redirects can break existing links and affect search visibility.
3. Check Your .htaccess File
On Apache and compatible web servers, WordPress commonly uses .htaccess for URL rewriting.
Incorrect or missing rewrite rules can cause posts and pages to return 404 errors.
How to Check .htaccess in cPanel
- Log in to cPanel.
- Open File Manager.
- Navigate to your WordPress installation directory.
- Enable Show Hidden Files.
- Locate
.htaccess. - Download a backup before editing.
For a typical WordPress installation in the domain’s root directory, the standard rewrite block resembles:
# 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
This example isn’t appropriate for every configuration.
WordPress installed in a subdirectory may require different rules, and nginx servers don’t process .htaccess files.
Avoid overwriting custom redirects, security rules or application-specific configuration.
4. Check for Plugin Conflicts
Some WordPress plugins modify URL handling, redirects or custom post types.
A plugin conflict may cause pages to return 404 errors after an update or configuration change.
How to Troubleshoot
Start with any plugin recently installed or updated.
Temporarily deactivate the suspected plugin, preferably on a staging website, and test the affected URL.
Pay particular attention to:
- Redirect plugins
- SEO plugins
- Security plugins
- Membership plugins
- Custom post type plugins
- Caching plugins
Don’t disable essential payment, security or customer-facing functionality without understanding the impact.
5. Check Your WordPress Website URLs
WordPress stores its main website addresses under Settings → General.
The relevant fields are:
- WordPress Address (URL)
- Site Address (URL)
Incorrect settings can cause unexpected redirects or broken URLs.
Confirm that both addresses use the correct domain and protocol.
For example:
https://example.com
Don’t change these settings without a recovery plan, especially when WordPress is installed in a different directory from the public website.
6. Fix 404 Errors After Website Migration
WordPress 404 errors sometimes appear after moving a website to another hosting provider.
The homepage may work while individual posts return 404.
Possible causes include:
- Missing rewrite rules
- Incorrect document root
- Changed website URLs
- Incomplete file transfers
- Incompatible server configuration
- Incorrect plugin settings
Migration Troubleshooting Checklist
- Confirm that the website files were transferred.
- Check the WordPress installation directory.
- Verify the domain’s document root.
- Review the permalink settings.
- Check
.htaccessor server rewrite configuration. - Test important pages.
- Review redirects from old URLs.
If the website recently moved to a new server, also confirm that DNS is directing visitors to the intended hosting environment.
7. Check Your Redirects
Redirects tell browsers and search engines that a URL has moved.
For example, suppose your old article was:
https://example.com/old-hosting-guide/
And the updated article is:
https://example.com/new-hosting-guide/
If the content permanently moved, a 301 redirect can direct visitors to the new address.
When Should You Use a 301 Redirect?
Use a permanent redirect when a page has moved permanently and there’s a relevant replacement.
Avoid redirecting every missing page to your homepage.
That can confuse visitors and may be treated as a soft 404 by search engines.
If a page has been permanently removed without a replacement, returning 404 or 410 may be more appropriate.
8. Clear WordPress and CDN Caches
Sometimes a caching layer continues serving an outdated error page after the underlying issue has been fixed.
If your website uses a WordPress caching plugin, clear the relevant cached content.
If you’re using Cloudflare, consider purging the affected URLs rather than clearing the entire cache unnecessarily.
Then test the website in a private browser window.
Caching isn’t the root cause of every 404 error, but it can make troubleshooting confusing.
9. Check Custom Post Types and Taxonomies
WordPress websites sometimes use custom post types for:
- Products
- Property listings
- Courses
- Portfolios
- Events
- Services
If their rewrite settings change, custom content URLs may stop working.
For example, a plugin might register a custom URL structure that conflicts with an existing page.
Review the plugin or theme responsible for registering the custom post type.
After correcting its settings, resave WordPress permalinks.
Avoid changing custom post type slugs without considering existing indexed URLs.
10. Check Web Server Rewrite Support
If resaving permalinks doesn’t help, the problem may involve the web server.
Apache installations generally require appropriate rewrite support and configuration.
LiteSpeed environments commonly support Apache-compatible rewrite rules.
nginx uses its own server configuration.
On shared hosting, you may need your provider to investigate server-level rewrite problems.
If you’re using a VPS, an authorized server administrator can inspect the virtual host configuration and relevant error logs.
Don’t change production server configuration without understanding the consequences.
11. Use Google Search Console to Find Broken URLs
Google Search Console can help identify URLs that Google has attempted to crawl but couldn’t find.
To review affected pages:
- Open Google Search Console.
- Select your verified website property.
- Navigate to Indexing → Pages.
- Review URLs reported as not found.
- Inspect important affected URLs.
Not every reported 404 requires fixing.
For example, an intentionally deleted page with no replacement can correctly return 404.
Prioritize pages that should exist, have valuable backlinks or previously attracted organic traffic.
12. Check Internal Links
Broken internal links can repeatedly send visitors and search engines to missing pages.
Review links in:
- Navigation menus
- Blog articles
- Footer sections
- Service pages
- Related-post sections
- Product descriptions
Update links that point to outdated URLs.
For Beta Host’s hosting blog, linking relevant tutorials to the correct service pages also helps visitors find useful information.
For example:
How to Prevent WordPress 404 Errors
You can reduce recurring 404 problems by following these practices:
- Keep permalink structures consistent.
- Avoid changing published URLs unnecessarily.
- Use appropriate redirects when content moves.
- Review plugins that modify URL handling.
- Test website migrations before switching DNS.
- Maintain regular backups.
- Check important internal links.
- Monitor Google Search Console.
- Review server configuration after major changes.
A consistent URL structure makes your website easier to maintain.
Do WordPress 404 Errors Affect SEO?
A few legitimate 404 pages won’t automatically damage your entire website’s Google rankings.
However, 404 errors can become an SEO problem when important pages disappear unexpectedly.
For example, if a popular article starts returning 404, visitors and search engines can no longer access its content.
Existing backlinks may also lead to an unavailable page.
SEO Best Practices for 404 Errors
If the page still exists: Restore the correct URL or fix the underlying problem.
If the page permanently moved: Use a 301 redirect to the relevant replacement.
If the page was permanently deleted: Return an appropriate 404 or 410 response.
If internal links are broken: Update them to the correct URLs.
If the issue is temporary: Restore the page and verify its HTTP response.
Avoid creating redirects without a clear destination.
WordPress Hosting and Website Reliability
WordPress websites depend on suitable hosting resources, correct configuration and regular maintenance.
Beta Host Limited provides hosting solutions for different website requirements.
Explore:
Choosing an appropriate hosting environment helps support your website, but broken permalinks and incorrect redirects still require proper configuration.
Frequently Asked Questions
Why does my WordPress homepage work but other pages show 404?
This often indicates a permalink or rewrite configuration problem. Try resaving your permalink settings and checking the server’s rewrite rules.
Will saving permalinks fix WordPress 404 errors?
It can resolve some rewrite-related problems, but it won’t restore deleted pages or fix every server configuration issue.
Can .htaccess cause WordPress 404 errors?
Yes. Missing or incorrect rewrite rules can prevent WordPress from resolving valid URLs on Apache-compatible servers.
Does a 404 error mean my website has been hacked?
No. A 404 error simply means the requested resource wasn’t found. Hacking is not the usual assumption when troubleshooting missing pages.
Should I redirect all 404 pages to my homepage?
No. Redirect only when there’s a genuinely relevant replacement. Unrelated homepage redirects can create a poor user experience and soft 404 issues.
How do I fix WordPress 404 errors after migration?
Check the document root, WordPress URLs, permalink settings, rewrite configuration and redirects.
Can Cloudflare cause a 404 error?
Cloudflare may cache or relay an error response, but the origin website can also be responsible. Check where the response originates before changing CDN settings.
Do 404 errors affect Google rankings?
Legitimate 404 responses are normal. However, important pages that unexpectedly disappear can lose search visibility if the problem remains unresolved.
Final Thoughts
WordPress 404 errors can be frustrating, especially when visitors can access your homepage but not your posts or pages.
Start by confirming that the affected content exists.
Then resave your permalink settings, review rewrite rules and investigate recent plugin or migration changes.
Use redirects only when a page has genuinely moved, and monitor Google Search Console for important missing URLs.
The goal is to restore valid pages, preserve useful links and maintain a clear website structure for visitors and search engines.
