Blog Tips & Tricks

How to Fix 404 Error in WordPress (Step-by-Step Guide)

How to Fix 404 Error on WordPress Website: Few Simple Steps

You click a page on your website, and instead of the content, you see one message:

“404 – Page Not Found.”

This error is common in WordPress websites. It usually appears when a page URL changes, a link is broken, or your permalink settings stop working properly.

For visitors, it’s frustrating.
It can lead to lost traffic, poor user experience, and lower search rankings.

The good news is that a 404 error is usually easy to fix once you know where the problem comes from.

In this guide, you will learn what a 404 error in WordPress means, why it happens, and how to fix it step by step. We will also share practical methods to prevent this error in the future, so your visitors can always reach the right page.

Let’s start by understanding what a 404 error actually means.

What Is a 404 Error in WordPress

404 error in WordPress means that the page a visitor is trying to open cannot be found on your website. The server receives the request, but it cannot locate the specific page or file, so it shows a “404 Page Not Found” message.

In simple terms, the link exists, but the content behind that link is missing or the URL is incorrect.

For example, imagine someone visits this page: example.com/blog/wordpress-seo-tips

If that page was deleted, renamed, or moved without updating the link, WordPress will display a 404 error page instead of the content.

Most WordPress themes show messages like:

  • “404 Page Not Found”
  • “Oops! That page can’t be found”
  • “The requested page does not exist”

This error can happen for several reasons. Common causes include a deleted page, a changed URL, broken permalinks, or incorrect links pointing to a page that no longer exists.

While a few 404 errors are normal on any website, too many broken pages can hurt the user experience and make it harder for visitors to find the content they need.

🔍

Common Causes of WordPress 404 Errors

1️⃣
Wrong permalink settings Broken permalink structures prevent WordPress from resolving URLs correctly—this is the #1 cause of 404 errors.
2️⃣
Deleted or moved pages Removed, renamed, or relocated content leaves old links pointing to nowhere.
3️⃣
Changed slugs or URLs Updating post/page slugs breaks all existing inbound links instantly.
4️⃣
Plugin conflicts URL rewrite changes from plugins (especially after updates) break site-wide links.
5️⃣
Theme issues New themes with different template/URL structures cause missing pages.
6️⃣
Corrupted .htaccess Broken or reset .htaccess files disable WordPress URL rewriting entirely.
7️⃣
Site migration/domain change New hosts, domains, or folders create URL mismatches everywhere.
8️⃣
Cache problems Stale browser/server cache serves old, non-existent URLs.

Need Help Fixing WordPress Errors?

If you want your website fixed fast and handled by experts, we can solve 404 errors, permalink issues, broken pages, and any other WordPress problem you are facing.

Contact Our WordPress Experts

How to fix 404 error on WordPress

Now, we walk you through 5 specific scenarios where 404 errors can occur- such as on pages, posts, after plugin or theme updates, or following a site migration- and provide detailed steps to troubleshoot and resolve them.

These solutions help you maintain a functional, user-friendly, and SEO-friendly website. 

Fix 404 error on WordPress pages and  posts

When a specific page on your WordPress site displays a 404 error, follow these steps:

Step 1: Update or re-save permalinks

  • Go to your WordPress dashboard.
  • Navigate to Settings > Permalinks.
  • Click the Save Changes button without modifying any settings.
    This action refreshes WordPress’s permalink structure and often resolves broken URLs.
refreshes WordPress’s permalink

Step 2: Check for deleted or renamed pages

  • If the page was accidentally deleted, recreate it using the same URL.
  • If the page was renamed or moved, create a 301 redirect using a plugin like Redirection to forward the old URL to the new page.

Step 3: Clean your website cache

  • Clear your website cache using caching plugins like WP Super Cache or W3 Total Cache.
  • Also, clear your browser cache and test the URL again.

Step 4: Check the .htaccess file

  • Access your site files via FTP or your hosting provider’s File Manager.
  • Locate the .htaccess file in the root directory.
  • Rename the file to .htaccess_backup, then go to Settings > Permalinks and save changes to regenerate the file.

Fix 404 error on WordPress after plugin update

Plugin updates can sometimes cause conflicts or break URLs.

Step 1: Identify the problematic plugin

  • Deactivate the most recently updated plugin.
  • Check if the 404 error appears after deactivation.
  • If the error resolves, contact the plugin developer for support or look for an alternative.
WordPress Plugin Update

Step 2: Roll back the plugin version

  • Use a plugin like WP Rollback to revert the plugin to its previous version.

Step 3: Flush rewrite rules

  • Reset permalinks by going to Settings > Permalinks and clicking Save Changes.
  • This action ensures the updated plugin hasn’t altered the URL structure.

Step 4: Clean the cache

  • Clear both browser and server caches to ensure old settings aren’t causing the issue.

Fix 404 error on WordPress after theme update

URL structures can be altered by themes (Page templates sometimes fail to transfer) which may result in 404 errors.

Step 1: Flush permalinks (same way)

  • Navigate to Settings > Permalinks in your WordPress dashboard.
  • Click Save Changes to reset the permalinks and resolve potential URL conflicts.

Step 2: Test with a default theme

  • Switch to the default WordPress theme “Twenty Twenty-Five”.
  • If the 404 error resolves, the issue lies in your updated theme. Contact the theme developer for assistance.
WordPress Theme Update

Step 3: Check custom templates

  • If your site uses custom page templates, ensure they are compatible with the updated theme.
  • Look for errors in the theme files, particularly single.php, page.php, or custom templates used by the page/post.

Step 4: Roll back the theme

  • Use the WP Rollback plugin to restore the previous theme version.

Fix 404 error on WordPress after migration

Error 404 is a common issue that arises after transferring a WordPress site to a different domain or hosting provider.

This indicates that the server was unable to locate the requested page or resource. In some cases, this problem happens if the htaccess file isn’t appropriately modified (which controls the server’s operations).

Step 1: Update permalinks

  • Go to Settings > Permalinks and click Save Changes to refresh the permalink structure.

Step 2: Search and replace old URLs

  • Use a plugin like Better Search Replace to update all database references from the old domain to the new one.

Step 3: Check the .htaccess File

  • Verify that the .htaccess file is correctly configured for your new server environment.
  • Regenerate it by renaming it and saving permalinks in WordPress as described above.

Step 4: Update DNS settings

  • Ensure your domain’s DNS settings are correctly configured to point to the new server.

Step 5: Test with search engines

  • Use Google Search Console to find and fix broken links caused by migration.
  • Create 301 redirects for old URLs pointing to their new equivalents.

Fix 404 error after changing a slug or URL

You will often see a 404 error right after you change a page or post URL. This happens because the old link still exists on your site and in search engines, but WordPress no longer knows where to send visitors.

Follow these steps to fix it fast:

Step 1: Create a redirect from the old URL

When you update a slug, the old URL becomes invalid. Set a 301 redirect so anyone visiting the old link goes to the new one.

You can use any redirect plugin, for example:

  • Redirection
  • Rank Math
  • Yoast SEO

Just enter your old URL → new URL → save. This protects your SEO and stops the 404 error right away.

Step 2: Update menus and internal links

Check where the old URL was used and update it.

Look inside:

  • Navigation menus
  • Buttons
  • Homepage banners
  • Blog links
  • Elementor templates
  • Footer links

Replace the old link with the new one to avoid more 404 errors.

Step 3: Flush permalinks

Go to Settings → Permalinks → Save Changes. You do not need to edit anything. This refreshes WordPress URL rules and fixes broken paths.

Step 4: Clear WordPress cache and CDN cache

Cache may still store the old link. Clear:

  • Your caching plugin
  • Your browser
  • Your CDN (Cloudflare, Bunny, etc.)

Once the cache is gone, WordPress loads the updated URL instantly.

📚 Related reading: WordPress Security Checklist 2026: Plugins, Updates, Backups

How to delete 404 pages in WordPress

A 404 page cannot be “deleted” inside WordPress because the page does not actually exist. A 404 error only appears when someone tries to open a link that points to a page that is no longer there.

So your goal is not to delete the page, but to remove the broken URL from Google and fix the links that lead to it.

Follow these steps to clean it up:

Step 1: Remove the URL From Google Search Console

Go to Google Search Console → Removals → New Request. Enter the 404 URL and submit it. This hides the broken link from Google results for a while and speeds up cleanup.

Step 2: Create a 301 redirect

If the old URL used to have a critical page, redirect it to a:

  • New page
  • Relevant category
  • Homepage

A redirect tells Google that the old page has moved. Use a simple redirect plugin to set this up in seconds.

Step 3: Fix internal links that point to the 404 URL

Check where the broken link is used.
Update or remove it in:

  • Posts
  • Menus
  • Widgets
  • Buttons
  • Elementor pages
  • Footer links

Once you fix these, users will stop landing on the missing page.

Step 4: Keep the 404 if the URL should not exist

If the page was never meant to exist, keep it as a 404. Google will drop it automatically during the next crawl. You do not need to delete anything in WordPress.

⚠️

How 404 Errors Hurt Your SEO & User Experience

404 errors aren’t just broken links—they silently damage your site’s credibility, search rankings, and revenue potential.

📈
Higher bounce rates – Visitors hit a dead end and leave immediately, signaling poor quality to Google.
🕷️
Wasted crawl budget – Bots spend time on broken URLs, delaying indexing of your valuable content.
📉
Ranking penalties – Sites with frequent 404s appear neglected, hurting authority and visibility.
💸
Lost revenue – Broken product, checkout, or form pages kill conversions instantly.
🛡️
Eroded trust – Repeated errors make users doubt your site’s reliability and professionalism.

Troubleshoot 404 Errors in WordPress

We have already discussed the different types of 404 errors in the previous sections. To summarize, when troubleshooting 404 errors in WordPress, be sure to check for broken links, incorrect URLs, or issues with permalink settings.

Solutions include resetting permalinks, correcting typing errors in URLs, and disabling plugins to identify conflicts. Keeping your website’s user experience positive requires addressing these errors.

Step 1: Identify the errors

  • Use tools like Google Search Console, Ahrefs, or Broken Link Checker to identify all 404 errors on your site.

Step 2: Check permalinks

  • Reset permalinks under Settings > Permalinks to fix potential URL structure issues.

Step 3: Inspect plugins and themes

  • Temporarily deactivate plugins or switch to a default WordPress theme to identify conflicts.

Step 4: Repair the .htaccess File

  • Access your site’s root directory via FTP.
  • Rename or delete the .htaccess file and regenerate it through permalinks.

Step 5: Set up redirects

  • Use the Redirection plugin to create 301 redirects for broken URLs, pointing them to relevant pages.

Step 6: Monitor for future errors

  • Use tools like MonsterInsights, Google Search Console, or 404 to 301 Redirect plugins to track and resolve 404 errors as they appear.

Tools to Monitor and Fix 404 Errors

These tools help you track 404 errors, find broken links, and fix issues early so your site stays healthy and user-friendly.

Google Search Console

Shows 404 pages that Google finds. Use the Coverage Report to spot errors and request re-indexing after fixing them.

Broken Link Checker

Scans your entire site for broken internal and external links and helps you fix them from the dashboard.

MonsterInsights (404 Tracking)

Tracks 404 errors through Google Analytics and shows where users land before hitting a broken page.

Redirection Plugin

Creates 301 redirects, tracks 404 logs in real time, and helps prevent broken URL issues after updates or slug changes.

Uptime Robot

Monitors your site 24/7 and alerts you when any page becomes unreachable or throws an error.

How to Prevent Future 404 Errors

You can avoid many 404 errors by keeping your URLs clean and checking your site regularly. Here are a few simple habits that help keep your WordPress site stable.

1. Use proper URL structure

Set a clean permalink format such as “Post Name.” You can do this in Settings → Permalinks, and you can also check the official WordPress guide on permalinks at the WordPress documentation.

2. Update redirects after changes

If you change a page slug or delete content, create a 301 redirect right away. A plugin like Redirection makes this easy and helps keep users away from broken links.

3. Do regular link audits

Check your site once in a while for broken links. Tools such as Google Search Console can show missing URLs, while Broken Link Checker can help you find problem links inside your site.

4. Test your site after plugin or theme updates

Updates can sometimes break permalinks or templates. After updating a plugin or theme, open a few key pages to make sure everything loads without errors.

5. Avoid changing URLs unless you need to

Try not to change slugs or page URLs too often. Every URL change creates new redirects and increases the chance of 404 errors.

Frequently Asked Question

  1. Q: Why am I getting a 404 error in WordPress?

    A 404 error means the server can’t find the page you’re trying to reach. Common causes in 2026: outdated permalinks, deleted/moved content without redirects, site migration issues, plugin/theme conflicts, or a corrupted .htaccess file. (See Step 1–3 in this guide for the fastest fixes.)

  2. Q: How do I fix a 404 error on WordPress?

    The #1 fix (works for 90% of cases): Go to Settings → Permalinks and click Save Changes (no need to change anything). This refreshes your rewrite rules. If it doesn’t work, clear cache, check .htaccess, or deactivate plugins one-by-one. Full step-by-step is right above!

  3. Q: Why is my WordPress admin (wp-admin or login page) showing a 404 error?

    This usually happens after changing permalinks or a plugin conflict. Quick fix: Reset permalinks (as above) or temporarily switch to a default theme like Twenty Twenty-Six. Also try clearing your browser cache or checking the site URL in your database (wp_options table).

  4. Q: How do I fix 404 error after changing permalinks?

    Just go back to Settings → Permalinks and click Save Changes again. This regenerates the .htaccess file. If you’re on Apache hosting (most USA hosts like Bluehost/GoDaddy), also make sure .htaccess is writable (permissions 644).

  5. Q: How to fix 404 errors after migrating a WordPress site?

    Migration is the #2 cause in the USA. Update permalinks first, then use a plugin like Redirection or Yoast SEO to set up 301 redirects. Also update your site URL in the database via phpMyAdmin if the domain changed.

  6. Q: How to create or edit a custom 404 page in WordPress?

    Use a plugin like 404page or SeedProd (drag-and-drop). Or edit your theme’s 404.php file via Appearance → Theme File Editor. Add a helpful message, search bar, and popular links so visitors don’t leave.

  7. Q: Does a 404 error affect my SEO ranking?

    A few 404s won’t hurt, but lots of them (especially in Google Search Console) can. Google sees them as poor user experience. Fix them quickly with redirects and monitor via Google Search Console → Indexing → Not found.

Conclusion

404 errors are common in WordPress, but they are easy to fix once you know where to look. Most issues come from broken permalinks, deleted pages, changed slugs, or updates that change how your site loads URLs.

By checking your links, setting proper redirects, and keeping your structure clean, you can prevent these errors from coming back.

Use the tools we shared to monitor your site and fix problems early. A site with fewer 404 errors loads better, ranks better, and feels more trustworthy for your visitors.

A few simple checks can keep your website running smoothly and error-free.

Need Help Fixing Your WordPress 404 Errors?

If you want a clean, error-free website but do not have time to fix 404 issues yourself, our team can help. We fix broken links, solve permalink issues, repair .htaccess errors, and make sure your pages load the right way every time.

Get WordPress Support
Blog Newsletter

x

World-class content, delivered to your inbox.


High-impact articles. No spam.