Introduction

A WordPress migration can finish successfully and still leave the site pointing at the wrong home URL. When that happens, you may see redirects to the old domain, broken admin sessions, missing assets, or mixed frontend behavior depending on which layer still remembers the previous address. The right fix is to trace where WordPress and the surrounding stack still believe the site lives.

Symptoms

  • The site redirects visitors to the old domain or staging URL
  • wp-admin loads inconsistently or logs users out after login
  • CSS, JavaScript, or media files load from the old hostname
  • Canonical URLs and internal links point to the wrong environment
  • The issue started immediately after a migration, domain cutover, or proxy change

Common Causes

  • home and siteurl values still point to the old domain in the database
  • A constant in wp-config.php overrides the database values
  • Reverse proxy or load balancer headers do not reflect the public hostname and scheme
  • Hardcoded redirects or search-and-replace misses leave old URLs in content or configuration
  • CDN, plugin, or browser caches preserve old redirect behavior after the move

Step-by-Step Fix

  1. Confirm the exact public URL the migrated site should use, including hostname, subdomain, and HTTPS behavior.
  2. Check the WordPress home and siteurl values and verify they match the intended public address.
  3. Review wp-config.php, mu-plugins, and deployment config for constants or filters that override URL settings at runtime.
  4. Inspect reverse-proxy and load-balancer headers so WordPress sees the correct host and protocol when building redirects and asset URLs.
  5. Search for hardcoded old-domain references in redirects, plugin settings, serialized options, and theme configuration.
  6. Purge application, server, CDN, and browser caches after correcting the canonical site address.
  7. Test login, admin navigation, asset loading, and internal links on the live hostname rather than only in the dashboard.
  8. Check for leftover staging restrictions or security rules that force traffic back to a previous environment.
  9. Document the final URL source of truth so future migrations do not leave WordPress, proxies, and caches disagreeing about the active domain.