WordPress 404 Error Fix: Bring Your Missing Pages Back

Person at a desk looking at a page not found screen — wordpress 404 error guide, TechSBSInfo logo at top left
A missing page does not have to stay missing — these seven fixes will bring it back.

A wordpress 404 error is one of the most confusing problems you can meet on a WordPress site. The page exists. You can see it in your dashboard. But when you or a visitor opens its URL, the site insists the page cannot be found.

A 404 simply means WordPress could not match the URL to any content. The page itself is usually still there, safe in your database. What is broken is the routing — the set of rewrite rules that connects a pretty URL like /about/ to the right post behind the scenes.

The good news is that most 404 errors are fixed in minutes. In the large majority of cases the cause is one of three things: broken permalink rules, a damaged .htaccess file, or a plugin interfering with redirects. This guide walks you through seven fixes in order, from the simplest to the most involved. Work through them one by one, and test your missing page after each step.

Quick Checks

Before you change anything, run through these fast checks. They take two minutes and often reveal a simple explanation.

  • Confirm the page is published. Open it in your dashboard and check the status says Published, not Draft, Pending or Private. Draft and private pages return 404s for logged-out visitors.
  • Retype the URL carefully. One wrong letter, a missing hyphen or an extra slash is enough to trigger a 404. Copy the permalink straight from the post editor to be safe.
  • Think about what changed recently. Did you rename the page, edit its slug, migrate the site or change the domain? Any of these breaks old URLs immediately.
  • Look in the trash. If the page was deleted by mistake, it sits in Trash for 30 days. A trashed page always returns a 404 while it is there.
  • Test in an incognito window. This rules out a stale browser cache or a login-state quirk. If the page loads in incognito, your cache is the problem, not your site.
  • Ask someone else to open the link. If it works for them but not for you, the issue is local — your browser, network or cache — rather than a site-wide fault.

Diagnose Table

SymptomLikely causeGo to fix
Every page 404s except the homepagePermalink rewrite rules are brokenFix 1
One page or post 404s, the rest workThe slug was changed, or the page is in the trashFix 5
404s started after installing or updating a pluginA plugin is hijacking redirects or rewritesFix 3
404s started after changing themesThe theme registers its own rewrite rulesFix 4
404s started after a migration or domain change.htaccess is missing or still points at the old setupFix 2
The site runs on Nginx rather than ApacheNginx needs manual rewrite rulesFix 6
You fixed it, but the 404 keeps showingA stale cache is serving the old error pageFix 7

1. Resave Permalinks to Clear a wordpress 404 error

Permalinks are the pretty URLs WordPress builds for your content, such as yoursite.com/about/ instead of yoursite.com/?p=123. Behind the scenes, WordPress keeps a set of rewrite rules that translate each pretty URL into the right database query. When those rules get corrupted — after a migration, a plugin update or a server hiccup — WordPress can no longer match URLs to content, and you get 404s everywhere except the homepage. The homepage still works because it does not need a rewrite rule.

Resaving your permalinks forces WordPress to throw away the broken rules and rebuild them from scratch. You do not need to change any setting. The act of saving is the fix.

  1. In your WordPress dashboard, go to Settings > Permalinks.
  2. Look at which structure is selected (most sites use Post name). Do not change it unless you have a specific reason.
  3. Click Save Changes at the bottom of the page.
  4. WordPress flushes the old rewrite rules and writes fresh ones.
  5. Open the missing page in an incognito window and check whether it loads.

This single step resolves the classic pattern — every page 404s but the homepage works — in the majority of cases. If your 404s persist, move on to Fix 2, because the rewrite rules may be failing at the server level rather than inside WordPress.

WordPress permalink settings screen — resaving permalinks fixes the wordpress 404 error
Resaving your permalink settings rebuilds the rewrite rules WordPress uses to match URLs to content.

For the full background on how permalink structures work, see WordPress’s official permalink documentation.

2. Check and Repair Your .htaccess File

If resaving permalinks did not help, the problem may sit one level lower: the .htaccess file. On Apache servers, this small hidden file in your site’s root folder holds the rewrite rules that tell the server how to route pretty URLs to WordPress. If it is missing, corrupted or overwritten by another application, Apache never hands the request to WordPress properly, and 404s follow.

First, back up the current file. A bad edit here can take your whole site down, so never skip the backup.

  1. Connect with FTP or open your host’s file manager, and show hidden files (filenames starting with a dot are hidden by default).
  2. Find .htaccess in the root folder of your WordPress installation — the same folder that contains wp-config.php.
  3. Download a copy to your computer. This is your backup.
  4. Open the file and check it contains the default WordPress block:
  5. It should start with # BEGIN WordPress and end with # END WordPress.
  6. Between those markers there should be the standard rewrite rules, including RewriteEngine On and a rule pointing requests to /index.php.
  7. If the block is missing or looks damaged, rename the file to .htaccess-backup, then go back to Settings > Permalinks and click Save Changes. WordPress will generate a fresh, correct .htaccess for you.
  8. Check the file permissions are 644 — readable by all, writable only by the owner. Overly strict permissions can stop WordPress updating the file.
  9. Never add your own rules between the # BEGIN WordPress and # END WordPress markers. WordPress overwrites that section whenever permalinks are saved, and your edits will vanish.
Server configuration file with rewrite rules — checking .htaccess for a wordpress 404 error
The .htaccess file stores the rewrite rules Apache needs to route your pretty URLs correctly.

If you want to compare your file against the official reference, see WordPress’s official .htaccess guide.

3. Deactivate Plugins to Find the Culprit

Plugins are the next most common cause. Redirect plugins, SEO plugins, security plugins and caching plugins all touch URLs or rewrite rules, and a single badly behaved one can send whole sections of your site to 404 pages. This often starts right after installing or updating a plugin, which makes the timing your best clue.

The reliable way to find the culprit is the process of elimination: turn everything off, confirm the 404s stop, then switch plugins back on one at a time.

  1. Go to Plugins > Installed Plugins in your dashboard.
  2. Select all plugins, choose Deactivate from the bulk actions menu, and click Apply. Do not deactivate plugins by deleting them — you want to keep their settings.
  3. Test your missing pages in an incognito window. If they load, a plugin was the cause.
  4. Reactivate plugins one by one, testing the broken URL after each one. When the 404 returns, you have found the culprit.
  5. Check the culprit’s settings for anything redirect-related — forced HTTPS rules, 404 redirect options, or URL rewriting features — and turn the offending feature off. If there is no safe setting, look for an alternative plugin.

Pay particular attention to redirect and security plugins, which sometimes ship with aggressive rules that catch legitimate pages. Also check whether the plugin added its own rules to your .htaccess file outside the WordPress markers (see Fix 2) — remove those lines once the plugin is gone. If you cannot access your dashboard at all, rename the /wp-content/plugins/ folder to /wp-content/plugins-off/ via FTP; WordPress will deactivate every plugin at once, and you can rename it back afterwards.

4. Switch to a Default Theme Briefly

Themes can cause 404s too, though it is less common. Some themes register custom post types or custom rewrite rules — for portfolios, testimonials or sliders, for example. If those rules are registered incorrectly, or if a theme update went wrong, the affected URLs return 404s. A theme conflict usually shows up right after you switch themes or update your current one.

  1. Go to Appearance > Themes in your dashboard.
  2. Activate a default WordPress theme such as Twenty Twenty-Four. Your content, menus and widgets stay safe; only the design layer changes.
  3. Test the broken URLs in an incognito window.
  4. If the pages load under the default theme, your theme is the problem. Check for a theme update, or contact the theme author with the exact URLs that fail.
  5. Switch back to your own theme when you are done testing.

If you use a child theme, test with the parent theme active as well — the fault can sit in either layer. And if the missing URLs belong to a custom post type (like /portfolio/project-name/), check the theme or plugin that registered that post type: deactivating it removes its rewrite rules, which guarantees 404s for its content until it is active again.

5. Check for Changed Slugs and Trashed Pages

When a single page 404s while everything else works, the URL itself has usually changed or the content is gone. WordPress builds each URL from the post slug — the editable part after the domain. Rename a page from “Our Services” to “What We Do” and the slug changes from /our-services/ to /what-we-do/. The old URL then 404s, which is correct behaviour, but it still needs handling.

  1. Open the page in the editor and look at the permalink/slug field near the title. Confirm it matches the URL you are trying to open, letter for letter.
  2. Remember that slugs are case-sensitive on most servers. /About/ and /about/ are different URLs.
  3. Go to Pages > All Pages (or Posts > All Posts) and search for the content. If it is not there, check the Trash view — restore it if you find it.
  4. If you renamed the slug deliberately, set up a redirect from the old URL to the new one so visitors and search engines land in the right place. A redirect plugin or your SEO plugin’s redirect manager can do this in a minute.
  5. Check for duplicate slugs. If two pages end up with the same slug, WordPress appends -2 to one of them, and links pointing at the un-suffixed URL may 404.
Broken chain link concept — changed slugs and deleted pages cause a wordpress 404 error
A renamed slug or deleted page breaks the link between a URL and its content.

This is also the moment to check your internal links. If your own menus or content link to the old URL, update them to the new one rather than relying on redirects forever. Redirects are a safety net, not a permanent architecture.

6. Check Your Server Configuration (Nginx and Multisite)

Everything so far assumes an Apache server, which reads .htaccess. If your host runs Nginx, there is no .htaccess file at all — Nginx does not read it. Instead, rewrite rules live in the server configuration, and if they are missing or wrong, WordPress pretty URLs 404 while the homepage and ?p=123-style URLs still work.

The standard Nginx rule WordPress needs looks like this:

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

You cannot edit this yourself on most managed hosting — it sits in the server config, not in your files. So the fix is:

  1. Confirm with your host whether the server runs Nginx or Apache. Most hosts will tell you in one reply.
  2. If it is Nginx, ask their support to check that the WordPress try_files rewrite rule is present for your site. This is a routine request and takes them minutes.
  3. If you manage your own server, add the rule to the site’s server block and reload Nginx.

Multisite installations deserve a special mention. Subdirectory multisites need extra rewrite rules beyond the standard set, and converting a site to multisite without updating them produces 404s on subsite pages. If your 404s affect subsites but not the main site, compare your server rules against the official multisite configuration and ask your host to correct any gaps. On Apache multisite, resaving permalinks on the network admin screen (not just the single site) rebuilds the rules for the whole network.

7. Clear Every Cache Layer

Here is a frustrating scenario: you fixed the real problem, but the 404 page keeps appearing. That usually means a stale cache is serving a saved copy of the error page instead of checking the live site. Caches exist at several layers, and you need to clear all of them to be sure you are testing the fix rather than the memory of the fault.

  1. Caching plugin: open your caching plugin (such as LiteSpeed Cache, WP Rocket or W3 Total Cache) and purge or empty the entire cache — not just one page.
  2. Server/host cache: many managed hosts run their own page cache. Look for a purge button in your hosting panel or in the host’s WordPress plugin.
  3. CDN cache: if you use Cloudflare or another CDN, purge the cache there too, and consider enabling development mode briefly while you test.
  4. Browser cache: hard-refresh with Ctrl + F5 (Windows) or Cmd + Shift + R (Mac), or test in a fresh incognito window.
  5. Re-test the broken URL after every layer is cleared. If the page loads now, the fix had already worked — the cache was simply hiding it.

If the 404 appears only in Chrome while other browsers load the page fine, the fault may lie with the browser itself rather than your site — see our guide on Chrome pages that will not load.

Browser refresh illustration — clearing caches that keep showing a wordpress 404 error
Purge every cache layer so you are testing the real fix, not a stored copy of the error page.

Make cache-clearing a habit during troubleshooting: purge first, test second. It saves you from chasing problems you have already solved.

What to Avoid

  • Do not delete your .htaccess file without a backup. Download a copy first. A missing or broken .htaccess can take down your entire site, not just one page.
  • Do not change your permalink structure on a live site on a whim. Switching from Post name to Day and name, for example, changes every URL on your site and creates mass 404s unless every old URL is redirected.
  • Do not add custom rules between the WordPress markers. Anything between # BEGIN WordPress and # END WordPress gets overwritten whenever permalinks are saved. Put custom rules outside those markers.
  • Do not install a random “404 fixer” plugin from an unknown author. Poorly coded plugins can make things worse or introduce security holes. Use the manual steps in this guide first.
  • Do not ignore persistent 404s. Beyond frustrating visitors, large numbers of broken internal links waste your crawl budget and weaken your site’s structure. Fix the cause, then redirect what cannot be restored.
  • Do not restore a full old backup just to fix a 404. A restore wipes everything published since the backup was taken. The seven fixes above are safer, faster and far more targeted.

FAQ

Why do I get a 404 error on a page that exists in WordPress?

Because the URL and the content are connected by rewrite rules, not by physical files. Your page sits safely in the database, but if the permalink rules, the .htaccess file or a plugin breaks that connection, WordPress cannot match the URL to the content and returns a 404. Work through Fixes 1 to 3 in this guide — they resolve the large majority of these cases.

Can a plugin really cause 404 errors?

Yes, and it is more common than most site owners expect. Redirect plugins, SEO plugins, security plugins and caching plugins all modify how URLs are handled. A single aggressive redirect rule or a corrupted rewrite can send whole sections of your site to 404 pages. Deactivate all plugins and reactivate them one by one (Fix 3) to identify the culprit with certainty.

Will changing my permalinks hurt my SEO?

Changing the permalink structure changes every URL on your site, which creates 404s for all previously indexed addresses unless you redirect each old URL to its new one. That is why you should pick a structure once — Post name suits most sites — and leave it alone. Merely resaving permalinks without changing the structure is harmless and is in fact the standard fix.

How do I fix 404 errors after migrating my WordPress site?

Migrations break URLs in two ways: the .htaccess file may not have carried over correctly, and hard-coded old-domain links may linger in the database. Start by resaving permalinks (Fix 1), then verify .htaccess (Fix 2), then search your content for links still pointing at the old domain and update them. If you changed domains, redirect the old domain to the new one at the server level.

Do 404 errors hurt my Google rankings?

A few 404s are completely normal — Google expects deleted pages to return them, and they do not directly penalise your site. The damage comes from scale and pattern: hundreds of broken internal links waste crawl budget, frustrate visitors and signal poor maintenance. Fix the underlying cause, redirect renamed URLs to their new locations, and update your internal links.

Conclusion

A wordpress 404 error looks alarming, but it is rarely serious. Your content is almost always intact — only the routing between the URL and the content has broken. Resave your permalinks, check your .htaccess file, rule out plugin and theme conflicts, and clear your caches, and the missing pages will come back.

For more step-by-step troubleshooting, browse our blog, learn more about TechSBSInfo, or return to the homepage.

Leave a Reply

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