Short answer: if the home page works but every inner page returns 404, WordPress is running but the server is not passing pretty URLs to it. The content is intact; the URL-rewriting layer moved badly.
Why the home page is the exception
The home page is served at the site root, which needs no rewriting. Every other URL — posts, pages, categories, archives — depends on a rewrite rule that hands the request to WordPress. When those rules are missing or ignored, only the root survives, which is exactly the pattern you see.
Fix it in the right order
- Confirm the Site and WordPress addresses in Settings › General match the new domain exactly, protocol included.
- Go to Settings › Permalinks and click Save without changing anything — this regenerates the rewrite rules and, on Apache, rewrites
.htaccess. - On Apache, confirm
AllowOverride Allis set so.htaccessis actually read; on Nginx, confirm thetry_files ... /index.php?$argsrule is present, since Nginx has no.htaccess. - Clear every cache layer, including the CDN, before re-testing.
Check for mixed old URLs too
A migration that broke permalinks often left absolute references to the old domain in the database. Those do not cause 404s alone, but they produce broken images, mixed-content warnings and odd redirects. Fix them with a search-and-replace that understands serialised data — WP-CLI’s wp search-replace 'oldurl' 'newurl' --skip-columns=guid — not a plain-text find and replace, which corrupts serialised arrays.
Verify
Test a post, a page, a category archive, a paginated listing and search. Then confirm the admin works and that no URL silently redirects back to the previous domain.
WP REPAIR INCIDENT STANDARD
Safe intervention sequence
When the home page works and inner routes 404, WordPress content is usually intact while the server rewrite layer or site base path is wrong.
- Confirm home/site URLs and the installation subdirectory after migration.
- Regenerate WordPress rewrite rules once.
- Verify Apache AllowOverride or the Nginx try_files rule actually used by this vhost.
- Test posts, pages, taxonomies, pagination, search and REST routes.
What must be verified
- Representative route types return their intended content.
- Old URLs redirect only where a valid replacement exists.
- No route silently returns to the previous domain or subdirectory.
Official technical sources
Continue the diagnosis
This guide explains the diagnosis. If the site is affected now, the intervention should preserve a rollback path and verify the real business journey.
See the emergency repair service →