• Email: [email protected]
  • Dedicated Server Login
  • About
  • 9288041031
  • Knowledge Base
  • Support
India's best web hosting | Ehostpiya India
  • Home
  • Hosting
    Web Hosting Quality Hosting Starting at ₹60/mo
    Cloud VPS Starting at ₹300/mo
    Dedicated Server First Starting at ₹2401/mo
    Reseller Web Hosting Conveniently Starting at ₹421/mo
    Application For Hosting
    • iconWordPress Hosting
    • iconJoomla Hosting
    • iconMagento Hosting
    • iconOpencart Hosting
    • iconPrestashop Hosting
    • iconDrupal Hosting
  • Email
  • Domain
  • SVG
    Contact Us Face any problem contact with us
    SVG
    About Us We are leading hosting company
  • My Account
Web Hosting Blogs by Ehostpiya | Tips and Tricks Web Hosting Blogs by Ehostpiya | Tips and Tricks
Buy Now

Archives

  • October 2026
  • September 2026
  • August 2026
  • October 2023

Categories

  • Control Panels
  • Magento
  • Miscellaneous
  • SEO
  • Technology
  • Trends
  • Web Hosting
  • Wordpress
Facebook Twitter Instagram Pinterest
Home How to Fix WordPress 404 Error
ByVandeeta
October 7, 2026

How to Fix WordPress 404 Error

Table of Contents

Toggle
  • How to Fix WordPress 404 Error
    • What Causes a WordPress 404 Error?
    • 1. Check the URL
    • 2. Refresh WordPress Permalinks
      • Steps
    • 3. Check the .htaccess File
      • How to regenerate .htaccess
    • 4. Check Whether the Page Still Exists
    • 5. Check the Page Slug
    • 6. Check WordPress Address and Site Address
    • 7. Temporarily Disable Plugins
    • 8. Test With a Default WordPress Theme
    • 9. Flush Custom Rewrite Rules
    • 10. Check for Incorrect Redirects
    • 11. Check Server Configuration
      • Apache
      • Nginx
    • 12. Clear Caches
    • 13. Check for Broken Internal Links
    • 14. Create a 301 Redirect for Permanently Moved Pages
    • 15. Check Recently Migrated Websites
    • 16. Check File and Directory Permissions
    • 17. Check the WordPress Error Logs
    • 18. How to Fix 404 Errors After Changing Permalinks
    • 19. How to Fix 404 Errors in WordPress Admin
    • 20. How to Prevent WordPress 404 Errors
    • Quick Troubleshooting Checklist
    • Conclusion

How to Fix WordPress 404 Error

A 404 Not Found error in WordPress means the requested page or resource cannot be found on the server. Visitors may see messages such as “404 Not Found,” “Page Not Found,” or “The requested URL was not found on this server.”

A WordPress 404 error can affect individual pages, posts, categories, images, or even the entire website. Fortunately, most 404 problems can be fixed without reinstalling WordPress.

This guide explains the common causes of WordPress 404 errors and provides practical solutions.

What Causes a WordPress 404 Error?

Common causes include:

  • Incorrect or broken permalink settings
  • A corrupted .htaccess file
  • Deleted or moved pages
  • Incorrect URLs
  • Plugin conflicts
  • Theme-related problems
  • Incorrect WordPress URL settings
  • Missing rewrite rules
  • Server configuration problems
  • Changes made during website migration
  • Broken internal links

Before making changes, it is a good idea to create a backup of your WordPress files and database.

1. Check the URL

Start with the simplest solution: verify that the URL is correct.

For example:

https://example.com/about-us/

Check for:

  • Spelling mistakes
  • Incorrect capitalization where relevant
  • Missing or extra characters
  • Incorrect category or post slugs
  • Old URLs saved in bookmarks

If the page was recently renamed, the old URL may no longer exist.

2. Refresh WordPress Permalinks

One of the most common causes of WordPress 404 errors is incorrect permalink configuration.

You can refresh the rewrite rules without changing your permalink structure.

Steps

  1. Log in to the WordPress dashboard.
  2. Go to Settings → Permalinks.
  3. Check your current permalink structure.
  4. Click Save Changes.

You do not need to change the permalink option. Simply saving the settings forces WordPress to regenerate its rewrite rules.

Now open the previously broken URL and check whether it works.

3. Check the .htaccess File

On Apache-based servers, WordPress uses the .htaccess file to handle URL rewriting.

A damaged or incorrect .htaccess file can cause 404 errors.

The default WordPress .htaccess configuration for a standard installation is:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

How to regenerate .htaccess

  1. Connect to your server using File Manager or FTP.
  2. Locate the WordPress installation directory.
  3. Enable Show Hidden Files if necessary.
  4. Find .htaccess.
  5. Download a backup copy.
  6. Rename or remove the existing file.
  7. Log in to WordPress.
  8. Go to Settings → Permalinks.
  9. Click Save Changes.

WordPress should generate a new .htaccess file automatically if the server allows it.

Important: If your website contains custom .htaccess rules, back up the file before replacing it.

4. Check Whether the Page Still Exists

If only one or a few URLs return a 404 error, the page may have been deleted or moved.

Go to:

WordPress Dashboard → Pages

or

WordPress Dashboard → Posts

Search for the missing content.

If the page exists, check its permalink or slug.

For example, a page may have changed from:

/services/

to:

/our-services/

In that case, the old URL will return a 404 error.

5. Check the Page Slug

WordPress generates URLs using slugs.

Open the affected post or page and check the Permalink or URL Slug.

For example:

Title: Web Hosting Services
Slug: web-hosting-services

The URL becomes:

https://example.com/web-hosting-services/

Make sure links pointing to the page use the current slug.

6. Check WordPress Address and Site Address

Incorrect WordPress URL settings can cause serious URL problems.

Go to:

Settings → General

Check these two values:

  • WordPress Address (URL)
  • Site Address (URL)

For example:

WordPress Address: https://example.com
Site Address: https://example.com

Make sure they use the correct:

  • Domain name
  • HTTPS/HTTP protocol
  • Subdirectory, if applicable

Do not change these values unless you know the correct configuration, especially on an existing production website.

7. Temporarily Disable Plugins

A plugin can sometimes modify URLs, rewrite rules, redirects, or custom post types and cause 404 errors.

To test for a plugin conflict:

  1. Go to Plugins → Installed Plugins.
  2. Temporarily deactivate the plugins.
  3. Test the broken URL.
  4. If the URL works, reactivate plugins one at a time.
  5. Test the website after activating each plugin.

When the 404 error returns, the last activated plugin is a strong candidate for the problem.

Plugins that commonly affect URLs include:

  • SEO plugins
  • Redirection plugins
  • Security plugins
  • Caching plugins
  • Custom post type plugins
  • Membership plugins

8. Test With a Default WordPress Theme

Your active theme may contain custom rewrite rules or routing code that causes 404 errors.

Temporarily switch to a default WordPress theme.

For example:

Appearance → Themes

Activate a default WordPress theme and test the affected URL.

If the page works afterward, investigate the theme’s:

  • functions.php
  • Custom rewrite rules
  • Custom post types
  • Template files
  • Routing logic

Restore your original theme after testing if necessary.

9. Flush Custom Rewrite Rules

If your website uses custom post types or custom taxonomies, their rewrite rules may need to be refreshed.

Go to:

Settings → Permalinks

Then click:

Save Changes

This flushes WordPress rewrite rules.

Developers registering custom post types should also ensure that rewrite settings are correctly configured.

For example:

register_post_type('products', [
    'public' => true,
    'rewrite' => [
        'slug' => 'products'
    ]
]);

After changing custom post type rewrite settings, refresh the permalink rules.

10. Check for Incorrect Redirects

Redirect plugins, server rules, or CDN configurations can sometimes send visitors to URLs that do not exist.

Review:

  • WordPress redirect plugins
  • .htaccess
  • Nginx configuration
  • CDN rules
  • Cloudflare redirect rules
  • Domain forwarding rules

Remove outdated or conflicting redirects.

11. Check Server Configuration

If permalink changes do not solve the problem, the issue may be related to your web server.

Apache

Make sure Apache has URL rewriting enabled and that the WordPress directory is allowed to use rewrite rules.

The mod_rewrite module is commonly required.

Nginx

Nginx does not use .htaccess. WordPress requires an appropriate Nginx configuration for pretty permalinks.

A typical configuration includes:

location / {
    try_files $uri $uri/ /index.php?$args;
}

After changing Nginx configuration, validate the configuration and reload Nginx.

If you use managed hosting, contact your hosting provider if you do not have access to the server configuration.

12. Clear Caches

Cached 404 responses can sometimes make it appear that the problem still exists after you have fixed it.

Clear caches from:

  • WordPress caching plugins
  • Server-level caching
  • CDN
  • Cloudflare
  • Browser

Then test the URL in a private/incognito browser window.

13. Check for Broken Internal Links

A website may generate 404 errors because other pages still link to an old URL.

For example:

Old URL:
https://example.com/wordpress-hosting/

New URL:
https://example.com/managed-wordpress-hosting/

Update internal links to point to the new URL.

You can also create a redirect from the old URL to the new one.

14. Create a 301 Redirect for Permanently Moved Pages

If a page has been permanently moved, redirect the old URL instead of leaving visitors with a 404.

For example:

/old-page/

can redirect to:

/new-page/

A 301 redirect tells browsers and search engines that the page has permanently moved.

This is particularly important when changing URLs on an established website because it can help preserve existing search traffic and backlinks.

15. Check Recently Migrated Websites

If the 404 errors appeared after moving WordPress to a new server or domain, check:

  • WordPress URL settings
  • .htaccess
  • Permalink structure
  • Database URLs
  • Server rewrite configuration
  • DNS settings
  • CDN configuration
  • File permissions

Always test several posts, pages, categories, and media URLs after a migration.

16. Check File and Directory Permissions

Incorrect permissions can prevent the server from accessing files correctly.

Typical Linux permissions often look like:

Directories: 755
Files:       644

Do not blindly change permissions on an entire server. Check your hosting provider’s recommended WordPress permissions and ownership settings.

17. Check the WordPress Error Logs

If the cause is still unclear, inspect the server and WordPress logs.

Depending on your hosting environment, useful locations may include:

PHP error logs
Apache error logs
Nginx error logs
WordPress debug.log

You can enable WordPress debugging temporarily with:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

The log is typically written to:

/wp-content/debug.log

Disable debugging after troubleshooting on a production website.

18. How to Fix 404 Errors After Changing Permalinks

Changing a permalink structure can cause previously indexed URLs to stop working.

For example:

Old:
/blog/post-name/

New:
/post-name/

The old URL may now return a 404.

To fix this:

  1. Decide on the correct permalink structure.
  2. Save the new permalink settings.
  3. Create redirects from important old URLs.
  4. Update internal links.
  5. Check your sitemap.
  6. Monitor Google Search Console for crawl errors.

Avoid changing URL structures unnecessarily on established websites.

19. How to Fix 404 Errors in WordPress Admin

If WordPress admin URLs themselves are returning 404 errors, the problem may be more serious.

Check:

  • .htaccess
  • WordPress URL settings
  • Security plugins
  • Login URL plugins
  • Server rewrite rules
  • Recent migrations
  • File integrity

If necessary, disable plugins manually through the database or by renaming the plugins directory.

For example:

/wp-content/plugins/

can temporarily be renamed:

/wp-content/plugins-disabled/

If the dashboard becomes accessible, a plugin conflict is likely.

20. How to Prevent WordPress 404 Errors

You can reduce future 404 problems by following good maintenance practices:

  • Avoid changing URLs unnecessarily.
  • Use descriptive and stable slugs.
  • Create redirects when moving pages.
  • Regularly check broken links.
  • Keep WordPress, themes, and plugins updated.
  • Maintain regular backups.
  • Test URLs after migrations.
  • Monitor crawl errors.
  • Keep server rewrite configuration correct.
  • Avoid installing unnecessary URL-management plugins.

Quick Troubleshooting Checklist

If your WordPress website suddenly starts showing 404 errors, work through this checklist:

☐ Check the URL
☐ Confirm the page still exists
☐ Check the page slug
☐ Save Settings → Permalinks
☐ Check .htaccess
☐ Check WordPress URL settings
☐ Disable plugins temporarily
☐ Test with a default theme
☐ Clear WordPress/server/CDN caches
☐ Check redirects
☐ Check Apache/Nginx configuration
☐ Review server and WordPress logs
☐ Add 301 redirects for moved pages

Conclusion

A WordPress 404 error usually means that WordPress or the web server cannot locate the requested URL. In many cases, simply resaving the permalink settings fixes the problem. If that does not work, investigate .htaccess, plugins, themes, redirects, server rewrite rules, and recent website changes.

For websites that have recently migrated or changed their URL structure, pay particular attention to permalinks, redirects, and server configuration. Fixing these issues quickly can prevent broken links, poor user experience, and unnecessary SEO problems.

ByVandeeta
Updated October 07, 2026
  • Wordpress

Read Next

ByVandeeta
October 7, 2026

How to Fix WordPress White Screen of Death

How to Fix WordPress White Screen of Death The WordPress White Screen of Death (WSOD) is one of…
  • Wordpress
ByVandeeta
October 7, 2026

How to Fix WordPress Database Connection Error

How to Fix WordPress Database Connection Error The WordPress Database Connection Error is one of the most common…
  • Wordpress
ByVandeeta
October 7, 2026

How to Fix WordPress Critical Error

How to Fix WordPress Critical Error A WordPress Critical Error occurs when a serious PHP problem prevents WordPress…
  • Wordpress

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Explore Categories

  • Control Panels 7
  • Magento 52
  • Miscellaneous 5
  • SEO 17
  • Technology 10
  • Trends 9
  • Web Hosting 7
  • Wordpress 100

Recent Posts

  • How to Fix WordPress “Too Many Redirects”
  • How to Fix WordPress Critical Error
  • How to Fix WordPress Database Connection Error
  • How to Fix WordPress White Screen of Death
  • How to Fix WordPress 404 Error

Recent Comments

  1. Tabias H. on The Future is 5G: Understanding the Next Wave of Connectivity
  2. Elliot Alderson on Evolving Workspaces: The Rise of the Hybrid Work Trend
  3. James Mann on Evolving Workspaces: The Rise of the Hybrid Work Trend
Swyft

Welcome to the Ehostpiya Blog, your trusted resource for web hosting, WordPress, VPS, domains, website security, and online business tips.

Our goal is to make web hosting and website management easier to understand for everyone—from beginners launching their first website to experienced developers and business owners. We publish practical guides, hosting tips, tutorials, and helpful insights to help you build, manage, and grow your website successfully.

At Ehostpiya, we believe that reliable information and quality hosting go hand in hand. Explore our latest articles and discover simple solutions for a faster, safer, and more successful online presence.

  • Facebook
  • Twitter
  • Instagram
  • Pinteres

Featured Posts

  • AI and Ethics: Navigating the Complex Landscape of Artificial Intelligence
    by Vandeeta
    October 11, 2023
  • AR and VR: Blurring the Lines Between Reality and Virtuality
    by Vandeeta
    October 11, 2023
  • Best WordPress Caching Plugins to Improve Website Speed
    by Vandeeta
    September 26, 2026
  • Blockchain Unchained: How Distributed Ledger Technology is Transforming Industries
    by Vandeeta
    October 11, 2023

Web Hosting Discount

cLAIM NOW
logo

Ehostpiya is reliable Web hosting provider, with aim to provide affordable Website and application hosting to various clients for their online business and presence.

Hosting
  • Web Hosting
  • Cloud VPS
  • Reseller Hosting
  • Email Hosting
  • Dedicated Server
  • Nodejs Hosting
  • SSL Certificate
Legal
  • Accepted Uses Policy
  • privacy Policy
  • Terms of Service
  • Refund and cancellation
  • Service Delivery Policy
Company
  • About Us
  • Our Clients
  • Contact Us
  • Our Blog
Support & Tools
  • Open Support Request
  • View Ticket
  • Knowledge Base
  • Report Abuse
  • check nameserver
  • What is my IP
  • Mx lookup

© Ehostpiya, All rights reserved

  • Terms & Condition
  • Privacy Policy