WordPress

WordPress migration lost pages: fix redirects

Separate WordPress old-slug redirects from a full migration map, then restore the missing server redirects without changing every URL again.

WordPress "wp_old_slug_redirect" only handles old slugs for published non-hierarchical posts, so Pages, permalink changes, and migrated domains or paths can remain broken. Record the current permalink structure, map the missing old URLs, add permanent redirects at the web server, and test each old address without changing the URL structure again.

Why WordPress does this

WordPress has limited automatic old-slug handling, not a migration map. Core stores an old slug only for published, non-hierarchical post objects, then wp_old_slug_redirect attempts a permanent redirect when that old slug returns 404. The function explicitly skips hierarchical post types, which includes normal Pages. It also does not solve a global change under Settings > Permalinks, where "Day and name", "Month and name", "Post name", "Custom Structure", "Category base", or "Tag base" can change many URL shapes at once. WordPress documents custom migration redirects in the web server configuration, including .htaccess on Apache.

Check it right now

Before changing anything, confirm what a crawler actually sees. The check is free, takes one URL and needs no account.

Run the check

How to fix it

  1. Run the redirect checker on a missing old URL. Record its status and destination before changing WordPress settings.
  2. Open Settings > Permalinks and record the selected structure plus "Category base" and "Tag base". Do not switch structures again to repair individual old URLs.
  3. For one renamed post, test whether WordPress core already redirects the stored old slug. Do not assume the same behavior for Pages or a site-wide permalink change.
  4. Build an old-to-new URL map for everything still returning 404. Add permanent server-side redirects to the matching new pages. On Apache, preserve them in .htaccess.
  5. If the migration changed the domain or install path, verify "WordPress Address (URL)" and "Site Address (URL)" under Settings > General.
  6. Test every old URL in the redirect checker. Each should go directly to its equivalent new URL, without a chain or a blanket jump to the home page.

Why it happens again

The WordPress migration guide warns that regenerating .htaccess for permalinks can remove custom rewrites and redirects. Back up the file, then check that the custom rules are still present after saving Permalinks or moving the site.

stillindexed re-checks the URLs you give it every 30 minutes on Starter and alerts when a directive changes, at most 30 minutes after it does. It is a monitor rather than a crawler: it watches a list you choose and tells you when one of seven things changes. Card first, no trial, and a 30 day refund.

See what monitoring covers

Catching it next time

Fixing it once is the easy half. The setting that caused this can be changed again by anyone with access, and the page will keep returning 200 while it happens.

Other ways WordPress loses pages

A migration or redesign losing pages from search, on other platforms

Sources

Every claim about WordPress above is from their own documentation, read on 2026-08-30. Platforms change their settings; if one of these is out of date, their page wins and we would like to know.