WordPress 404 Errors: Why Pages Suddenly Disappear

WordPress 404 Errors: Why Pages Suddenly Disappear

You open your website and everything looks normal.

The homepage is working. The WordPress dashboard is accessible. Your images are still there. But when you click an old blog post, a service page, or a link from Google, you suddenly see:

404 — Page Not Found

It’s one of those WordPress problems that can appear out of nowhere.

A page was working yesterday. Today, it has disappeared.

Sometimes only one URL returns a 404. In other cases, an entire section of the website stops working. You might even find that your homepage loads perfectly while every individual post or page shows a 404 error.

The good news is that a 404 error doesn’t necessarily mean your content has been permanently deleted.

In many WordPress websites, the actual content is still sitting safely in the database. The problem is that WordPress, the web server, a plugin, or a redirect rule isn’t correctly connecting the requested URL to that content.

WordPress uses rewrite rules to translate human-friendly URLs into the queries WordPress needs to find posts, pages, categories, and other content. When those rules become outdated or don’t match the current permalink structure, URLs can suddenly stop resolving correctly.

So before you panic and start restoring backups, let’s look at why WordPress 404 errors happen and, more importantly, how you can fix them.

Featured image suggestion: A WordPress website showing a 404 “Page Not Found” screen.

Image source: Unsplash – 404 Error Images


What Does a 404 Error Actually Mean?

A 404 Not Found error means the server couldn’t find the resource requested at that URL.

In simple terms, someone visits:

example.com/services/web-design/

but the website can’t find a resource that matches that request.

That doesn’t always mean the content itself is gone.

There are several possibilities:

  • The page was deleted.
  • The page was moved.
  • The URL/slug was changed.
  • The permalink structure changed.
  • WordPress rewrite rules need to be refreshed.
  • A plugin is interfering with routing.
  • A redirect is missing or incorrect.
  • The server isn’t processing rewrite rules correctly.
  • A custom post type has a rewrite problem.
  • A migration changed the site’s URL configuration.
  • .htaccess rules are incorrect or missing.
  • A page and another content type have conflicting slugs.

WordPress itself handles a request as a 404 when the requested URL doesn’t resolve to an appropriate post, page, archive, or other recognized object.

That’s why the first thing you need to determine is:

Is the content actually gone, or is WordPress simply unable to find it at that URL?

That distinction can save you a lot of unnecessary work.


Why Do WordPress Pages Suddenly Disappear?

A WordPress website doesn’t usually wake up one morning and randomly delete pages.

When pages suddenly start returning 404 errors, there is normally something behind the change.

The most common causes include:

  1. Permalink settings were changed.
  2. Rewrite rules became outdated.
  3. A plugin changed URL behavior.
  4. A page slug was changed.
  5. The page was deleted or moved.
  6. A redirect wasn’t created after changing the URL.
  7. .htaccess rules are missing or incorrect.
  8. A custom post type isn’t registering correctly.
  9. Two content types are using conflicting URLs.
  10. A website migration changed server configuration.
  11. A theme or plugin update changed rewrite behavior.
  12. A CDN or cache is serving an outdated response.

Let’s look at each one.


1. Permalink Settings Are the First Thing to Check

If several WordPress pages suddenly return 404 errors, permalinks should be one of the first things you check.

Permalinks are the permanent URLs used for your posts, pages, categories, tags, and other content.

For example:

example.com/about-us/
example.com/blog/wordpress-tips/
example.com/contact/

WordPress allows you to choose different permalink structures from:

Settings → Permalinks

The important part is that WordPress uses rewrite rules behind the scenes to make these friendly URLs work.

If those rules become stale or don’t match the current configuration, you can get widespread 404 errors.

WordPress documentation specifically recommends visiting the Permalinks screen and saving the settings to refresh rewrite rules when pretty permalink 404 problems occur.

The Simple Fix

Go to:

WordPress Dashboard → Settings → Permalinks

You don’t necessarily need to change the permalink structure.

Simply review the current setting and click:

Save Changes

This causes WordPress to refresh its rewrite rules.

Then open the previously broken URL again.

In many cases, that’s all you need.


2. Rewrite Rules May Have Become Outdated

This is the technical part behind many WordPress 404 problems.

WordPress has a rewrite system that maps URL patterns to the appropriate WordPress queries.

For example, when someone visits:

example.com/my-blog-post/

WordPress needs to figure out which post corresponds to:

my-blog-post

WordPress’s WP_Rewrite system generates and stores rules that help WordPress interpret these permalink structures.

Problems can appear after:

  • Installing a plugin
  • Registering a custom post type
  • Changing permalink settings
  • Changing themes
  • Migrating the site
  • Importing content
  • Changing URL structures
  • Updating a plugin that uses custom rewrite rules

The content may still exist.

The URL routing simply isn’t working correctly.

How to Refresh Rewrite Rules

The easiest method is:

Dashboard → Settings → Permalinks → Save Changes

You can leave the existing permalink structure exactly as it is.

The goal is to refresh the rules, not necessarily redesign your URLs.


3. A Page’s URL or Slug Was Changed

This is one of the simplest explanations for a 404.

Imagine your page originally had this URL:

example.com/services/

Later, you change the slug to:

example.com/our-services/

The new URL works.

But someone visits the old URL:

example.com/services/

If no redirect exists, the old URL may return a 404.

This can happen accidentally.

Maybe you changed the title of a page.

Maybe you changed its slug while doing SEO work.

Maybe a client renamed a service.

Maybe you migrated content from another website.

Whatever the reason, the old URL can continue to exist in:

  • Google search results
  • Social media posts
  • Old blog articles
  • Email newsletters
  • Other websites
  • Bookmarks
  • Internal links

That’s why changing a URL should be treated as more than simply changing a slug.


4. You Deleted the Page

Sometimes the explanation really is that simple.

If a page was deleted from WordPress, its old URL will no longer resolve to that page.

Check:

Pages → Trash

or:

Posts → Trash

depending on the type of content.

If the page is there and you actually need it, you may be able to restore it.

But if the page was intentionally removed, don’t automatically recreate it just to eliminate the 404.

A 404 can be perfectly appropriate when a URL genuinely no longer exists.

The real question is whether users who visit the old URL should be redirected somewhere relevant.


5. You Changed the Permalink Structure

This can create a much bigger problem.

Imagine your website originally used:

example.com/%postname%/

and later you change it to:

example.com/blog/%postname%/

Your old article:

example.com/wordpress-tips/

could now become:

example.com/blog/wordpress-tips/

If redirects aren’t handled correctly, the old URLs may return 404 errors.

This is especially important on established websites.

Changing a permalink structure can affect hundreds or even thousands of URLs.

WordPress describes permalinks as permanent URLs and notes that they are used by visitors, other websites, social sharing, and search engines.

So don’t change a site’s URL structure casually.


6. Your .htaccess File May Be Causing the Problem

If your WordPress website runs on Apache, .htaccess can be important for pretty permalink functionality.

A problem with .htaccess can cause URLs to stop working even when the WordPress content itself is fine.

WordPress documentation notes that pretty permalink 404 problems can occur when Apache’s mod_rewrite functionality isn’t enabled or when rewrite rules aren’t correctly configured.

A typical WordPress .htaccess setup contains rewrite rules similar to:

# 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

Important: Don’t blindly replace your .htaccess file if you aren’t comfortable managing server configuration.

A mistake here can cause additional problems.

If you’re unsure, take a backup first or ask your hosting provider to check the rewrite configuration.


7. Your Hosting Server Isn’t Handling Rewrite Rules Correctly

WordPress can be configured correctly while the server isn’t handling the URLs as expected.

For Apache-based hosting, this may involve:

  • mod_rewrite
  • .htaccess
  • Apache configuration
  • File permissions
  • Server-level redirects

For other server environments, the configuration is different.

WordPress’s troubleshooting documentation specifically identifies missing or inactive mod_rewrite support as one possible cause of 404 errors with Pretty Permalinks.

If saving permalinks doesn’t fix the problem and multiple URLs remain broken, your hosting provider may need to investigate the server configuration.


8. A Plugin May Be Breaking Your URLs

Plugins can add their own rewrite rules.

This is particularly common with plugins that create:

  • Custom post types
  • Membership pages
  • Ecommerce pages
  • Forums
  • Job listings
  • Events
  • Real estate listings
  • Documentation sections
  • Custom archives

WordPress provides APIs that plugins can use to register custom rewrite rules. Those rules need to be registered and refreshed correctly.

A plugin update can sometimes expose a routing problem that wasn’t visible before.

How to Test for a Plugin Conflict

If the problem started after installing or updating a plugin:

  1. Back up your website.
  2. Temporarily deactivate the suspected plugin.
  3. Test the broken URL.
  4. If the URL works again, investigate that plugin.
  5. If necessary, contact the plugin developer.

Don’t deactivate plugins randomly on a busy production website without understanding the consequences.

If you need to troubleshoot, use a staging site when possible.


9. Custom Post Types Can Suddenly Return 404

This one is particularly common on advanced WordPress websites.

Suppose you have a custom post type called:

portfolio

and its URLs look like:

example.com/portfolio/project-one/

If the custom post type’s rewrite configuration changes, those URLs can stop working.

WordPress documentation specifically mentions custom post type 404 issues and recommends checking for naming conflicts and refreshing permalink rules.

This can happen with:

  • Portfolio plugins
  • Property plugins
  • Directory plugins
  • Event plugins
  • Job board plugins
  • WooCommerce extensions
  • Custom development

If normal Pages work but a particular custom content type doesn’t, investigate its rewrite registration.


10. Two Content Types May Have the Same Slug

Slug conflicts can create confusing results.

Imagine you have:

Page: /services/

and another content type also attempts to use:

/services/

WordPress has to determine which content should respond to that URL.

Custom post types, pages, taxonomies, and other rewrite structures can overlap.

WordPress specifically recommends checking whether a custom post type and a page have the same name when troubleshooting custom post type 404 errors.

What Should You Do?

Check:

Pages → All Pages

Then check the relevant custom post type.

Look for duplicate or conflicting slugs.

Changing one of them to a unique slug can resolve the conflict.


11. Website Migration Can Create 404 Errors

Website migrations are another common trigger.

You move a WordPress website from:

oldhosting.com

to:

newhosting.com

or from one server to another.

The homepage works.

You feel relieved.

Then you click an internal page.

You try a blog post.

Another page.

This can happen when the new server isn’t configured correctly for WordPress’s permalink system.

A migration can also affect:

  • .htaccess
  • Nginx configuration
  • Apache modules
  • Site URL settings
  • Database URLs
  • Redirect rules
  • CDN configuration
  • Plugin settings

After migration, always test more than just the homepage.

Test:

  • Homepage
  • One normal Page
  • One blog post
  • Category
  • Tag
  • Search
  • Custom post type
  • Images
  • Sitemap
  • Important landing pages

12. Theme Changes Can Affect 404 Behavior

Changing themes can sometimes affect how URLs and templates are handled, particularly when the theme works with custom post types or custom taxonomies.

WordPress themes can provide a 404.php template for pages that aren’t found. WordPress’s Theme Handbook explains that the 404.php template is used when a requested page cannot be found.

However, there’s an important distinction:

A 404 template is not necessarily the cause of a 404.

Your 404.php file controls what visitors see when WordPress determines that the requested resource doesn’t exist.

It doesn’t magically make a missing URL exist.

So if your website displays a beautiful custom 404 page, that’s useful for visitors—but it doesn’t fix the underlying routing problem.


13. Your Redirects May Be Missing

Let’s say you changed:

/blog/wordpress-guide/

to:

/wordpress-guide/

The new page works.

But visitors using the old URL receive:

404 Not Found

This is where a redirect comes in.

A 301 redirect can tell browsers and search engines that the content has permanently moved.

For example:

Old URL
/blog/wordpress-guide/

        ↓ 301

New URL
/wordpress-guide/

For SEO-sensitive URL changes, proper redirects are important because they help visitors and search engines reach the new location.

The key is to redirect to the most relevant replacement, rather than sending every old URL to the homepage.


14. Don’t Redirect Every 404 to the Homepage

This is a common shortcut.

Someone sees hundreds of 404 URLs and thinks:

“I’ll just redirect everything to the homepage.”

It may appear to solve the problem because visitors no longer see a 404.

But that’s not always a good solution.

If someone requests:

example.com/old-web-design-guide/

and you send them to:

example.com/

the visitor still hasn’t reached the content they were looking for.

A better approach is:

Old article → closest relevant new article

Old product → replacement product

Old service → current equivalent service

If there is genuinely no replacement, keeping a proper 404 may be better than creating a misleading redirect.


15. Cached 404 Responses Can Make the Problem Look Worse

Caching isn’t only for successful pages.

Depending on your caching setup, an old 404 response may also be cached.

This creates a confusing situation:

You fix the page.

You refresh it.

Still 404.

You check WordPress.

The page exists.

You check the URL.

It’s correct.

The problem may be that a cache is still serving the previous 404 response.

If you’ve recently fixed a broken URL, clear relevant:

  • WordPress cache
  • Server cache
  • CDN cache
  • Browser cache

Then test again.


16. Check the URL Carefully

Sometimes the problem isn’t technical at all.

Look closely at the URL.

Compare:

example.com/about-us/

with:

example.com/about/

Or:

example.com/blog/wordpress-tips/

with:

example.com/wordpress-tips/

Also check:

  • Spelling
  • Hyphens
  • Extra words
  • Trailing slashes
  • Category prefixes
  • Upper/lowercase differences
  • Old domain
  • HTTP vs HTTPS
  • Subdirectory paths

A tiny URL difference can result in a 404.


17. Check Whether the Page Still Exists in WordPress

Before changing server settings, confirm the content actually exists.

Go to:

Pages → All Pages

Search for the page title.

If it’s a post:

Posts → All Posts

If it’s a custom post type, open its relevant dashboard section.

Check:

  • Status
  • Slug
  • Published date
  • Visibility
  • URL
  • Parent page
  • Trash

If the content exists and is published, but its URL returns 404, then the problem is likely related to routing, rewrite rules, redirects, or conflicts.


18. Use WordPress’s Permalink Screen as a Diagnostic Tool

The Permalinks screen is more useful than many people realize.

Go to:

Settings → Permalinks

Look at the current structure.

For example:

Post name

or another configured structure.

Then click:

Save Changes

WordPress documentation notes that visiting the Permalinks screen triggers a flush of rewrite rules; saving is not strictly required just to trigger that flush.

For most users, simply opening the screen and saving the current configuration is the easiest practical way to refresh the rules.


19. What If Only One Page Returns 404?

If only one page is broken while everything else works, don’t immediately start changing server configuration.

Check these things first:

Check the page exists

Make sure it hasn’t been deleted.

Check its slug

Make sure the URL is exactly what you expect.

Check redirects

See whether the old URL was moved somewhere else.

Check for a duplicate slug

Look for another page or content type using the same slug.

Refresh permalinks

Go to:

Settings → Permalinks → Save Changes

Test without caching

Open the URL in a private browser window.

This is usually much faster than making major server changes.


20. What If Every Page Returns 404 but the Homepage Works?

This is a very important clue.

If:

example.com/

works,

but:

example.com/about/
example.com/contact/
example.com/blog/post/

all return 404,

then your permalink/rewrite configuration deserves immediate attention.

This pattern is consistent with a rewrite problem rather than every page suddenly disappearing from the database.

WordPress’s own troubleshooting documentation highlights Pretty Permalink rewrite configuration as a potential cause of this kind of 404 behavior.

First thing to try:

Settings → Permalinks → Save Changes

Then test again.

If that doesn’t solve it, investigate:

  • .htaccess
  • Apache mod_rewrite
  • Nginx configuration
  • Server migration
  • Security plugins
  • Redirect plugins
  • Recent theme/plugin changes

21. What If Only Blog Posts Are 404?

If Pages work but Posts don’t, look at your post permalink structure.

For example:

Pages:
example.com/about/

Works

Posts:
example.com/my-first-post/

404

Possible causes include:

  • Broken post rewrite rules
  • Custom permalink structure
  • Plugin conflict
  • Theme changes
  • Custom post type conflict
  • Rewrite rules not refreshed

Again, start with:

Settings → Permalinks → Save Changes

Then test an old post and a newly published test post.


22. What If Only Categories or Tags Are 404?

If individual posts work but category archives don’t, the problem may be related to taxonomy rewrite rules.

For example:

example.com/category/wordpress/

might return 404 while:

example.com/wordpress-css-guide/

works perfectly.

Check:

  • Category base
  • Custom category settings
  • SEO/redirect plugins
  • Taxonomy configuration
  • Theme templates
  • Rewrite rules

If a plugin registers custom taxonomies, its rewrite configuration can also be involved.


23. What If WooCommerce URLs Are Returning 404?

On ecommerce websites, you may notice that product or shop URLs suddenly stop working.

For example:

example.com/product/blue-shirt/

returns 404.

But the homepage and normal pages work.

This can point toward a WooCommerce permalink or rewrite issue.

Check the relevant WooCommerce URL/permalink settings, then refresh WordPress’s permalink rules.

Also check whether another plugin has changed the same URL structure.

If the problem started immediately after a WooCommerce or plugin update, investigate the recent change before modifying server files.


24. What If the Website Was Recently Moved to a New Server?

If 404 errors appeared immediately after migration, don’t overlook the hosting environment.

Ask the hosting provider to check:

  • Apache/Nginx configuration
  • Rewrite rules
  • .htaccess
  • mod_rewrite
  • PHP configuration
  • Document root
  • Site URL
  • SSL configuration
  • Redirect rules

The fact that the homepage works doesn’t necessarily mean the entire server configuration is correct.


25. A Practical WordPress 404 Troubleshooting Process

Here’s the process I’d follow on a real WordPress website.

Step 1: Identify the Scope

Ask:

Is one URL broken or many?

One URL suggests a page/slug/redirect problem.

Many URLs suggest a routing, rewrite, plugin, server, or migration issue.


Step 2: Check the Content

Confirm the page or post still exists.


Step 3: Check the URL

Compare the broken URL with the actual permalink shown in WordPress.


Step 4: Refresh Permalinks

Go to:

Settings → Permalinks

Then save the current settings.


Step 5: Clear Caches

Clear:

  • WordPress cache
  • Server cache
  • CDN cache
  • Browser cache

Step 6: Check Recent Changes

Ask yourself:

What changed before the 404 appeared?

Was it:

  • Plugin update?
  • Theme update?
  • New plugin?
  • URL change?
  • Migration?
  • Hosting change?
  • Security plugin?
  • New custom post type?

The timing can provide a very useful clue.


Step 7: Check Plugins

If the problem appears related to a plugin, test for a plugin conflict.


Step 8: Check Server Configuration

If the issue affects many URLs and doesn’t disappear after refreshing permalinks, ask your hosting provider to check rewrite configuration.


26. How to Prevent WordPress 404 Errors in the Future

You can’t prevent every 404.

People will delete pages.

URLs will change.

Websites will be redesigned.

But you can reduce unnecessary 404 errors.

Keep URL structures stable

Don’t change URLs just because you feel like making them slightly prettier.

Create redirects when URLs genuinely move

If a page has a new permanent location, redirect the old URL appropriately.

Monitor important URLs

Regularly check your:

  • Homepage
  • Main service pages
  • Blog
  • Popular articles
  • Product pages
  • Contact page
  • Category archives

Test after migrations

Never assume that a migration worked simply because the homepage loads.

Be careful with permalink changes

Changing the site’s permalink structure can affect many existing URLs.

Keep plugins updated

But test major changes on staging when possible.

Maintain backups

Before major URL, theme, plugin, or server changes, have a reliable backup.


27. Why 404 Errors Matter for SEO

A single 404 isn’t automatically an SEO disaster.

The internet naturally contains URLs that no longer exist.

The bigger concern is having important URLs returning 404 when they should still be accessible.

For example, imagine your website has a popular article that ranks in Google and receives backlinks.

Then you accidentally change its URL.

If the old URL becomes a 404 and there’s no relevant redirect, visitors following old links may never reach the article.

That’s why URL changes on established websites should be handled carefully.

Think about the difference between:

A page that genuinely no longer exists

and

A page that still exists but has moved

Those situations require different handling.


28. Don’t Panic When You See a 404

This might be the most important advice in this entire article.

A 404 doesn’t automatically mean:

  • Your website is hacked.
  • Your database is corrupted.
  • Your page is permanently deleted.
  • You need to restore a backup.
  • Your entire website needs rebuilding.

Sometimes the fix is literally:

Settings → Permalinks → Save Changes

Other times you need to investigate a plugin, server configuration, redirect, or custom rewrite rule.

The important thing is to diagnose the problem before making major changes.


WordPress 404 Errors: Quick Fix Checklist

If you need a quick checklist, use this:

One page is showing 404?

  • Check whether the page still exists.
  • Check the slug.
  • Check the permalink.
  • Check Trash.
  • Check redirects.
  • Check for duplicate slugs.
  • Save Permalinks.
  • Clear cache.

Many pages are showing 404?

  • Save Permalinks.
  • Check rewrite rules.
  • Check .htaccess.
  • Check Apache/Nginx configuration.
  • Check recent plugin/theme changes.
  • Check recent migration.
  • Clear server/CDN cache.
  • Contact your host if necessary.

Homepage works but posts don’t?

  • Check post permalink structure.
  • Refresh rewrite rules.
  • Check plugins.
  • Check custom post types.
  • Check theme changes.

New pages work but old URLs don’t?

  • Check whether the old slugs changed.
  • Add appropriate redirects.
  • Review links pointing to the old URLs.

Frequently Asked Questions

Why are my WordPress pages suddenly showing 404?

The most common causes include outdated rewrite rules, changed permalinks, deleted or moved pages, plugin conflicts, custom post type problems, incorrect server rewrite configuration, or missing redirects.

How do I fix a 404 error in WordPress?

Start by checking whether the content exists, then go to Settings → Permalinks and save the current settings to refresh rewrite rules. If that doesn’t work, investigate plugins, redirects, .htaccess, server configuration, and caching.

Will saving Permalinks delete my pages?

No. Saving the Permalinks settings is used to update/refresh WordPress’s URL rewrite configuration. It doesn’t delete your posts or pages.

Why does my WordPress homepage work but every other page gives 404?

This pattern can point toward a permalink/rewrite problem. Check Settings → Permalinks first. If refreshing the rules doesn’t solve it, investigate .htaccess, mod_rewrite, Nginx/Apache configuration, plugins, and recent migrations.

Can a plugin cause WordPress 404 errors?

Yes. Plugins can register or modify rewrite rules, custom post types, taxonomies, redirects, and other URL behavior. A plugin conflict can therefore result in 404 errors.

Should I redirect every 404 page to my homepage?

No. A redirect should normally lead users to the most relevant replacement page. If there is no suitable replacement, a proper 404 can be more appropriate than sending visitors to an unrelated homepage.

Are 404 errors bad for SEO?

Not every 404 is a problem. Websites naturally have URLs that no longer exist. The bigger concern is important, valuable URLs returning 404 when the content still exists somewhere else or has simply moved.

Can .htaccess cause 404 errors?

Yes. On Apache-based WordPress installations, incorrect or missing rewrite rules can prevent Pretty Permalinks from working correctly. WordPress documentation identifies rewrite configuration as a possible cause of Pretty Permalink 404 errors.


Final Thoughts

WordPress 404 errors can look scary, especially when pages that were working perfectly yesterday suddenly disappear.

But in many cases, the content itself hasn’t gone anywhere.

The problem is somewhere between the URL and the content WordPress is trying to serve.

Start with the simplest checks:

Does the page still exist?

Is the URL correct?

Did the slug change?

Did you refresh the permalink rules?

Is a plugin interfering?

Are the server rewrite rules working?

Was the website recently migrated or redesigned?

Once you identify where the URL routing is breaking, the fix is usually much more straightforward.

And remember: don’t treat every 404 as something that needs to be redirected to the homepage.

A good WordPress website doesn’t try to hide every missing URL. It makes sure that important content is available at the correct URL, redirects genuinely moved content to its relevant new location, and gives visitors a useful 404 page when a resource really doesn’t exist.

That’s how you turn a frustrating “Page Not Found” message into a manageable WordPress troubleshooting problem.