How to Move a WordPress Site from Subdomain to Main Domain

Your Site Is on a Staging Subdomain or Temporary URL. Moving It to the Main Domain Is a Critical Migration Step.

Many WordPress sites are built on subdomains or temporary URLs — staging.yoursite.com, yoursite.wordpresshost.com, or a developer’s test domain. Moving to the main domain is the final launch step. Get it wrong and your site breaks, your database has wrong URLs everywhere, and your launch becomes a recovery operation.

“The subdomain to main domain move is the most common migration that goes wrong — because people think it is simple and skip steps.”

The Migration Process

1. Update WordPress settings: Before moving, update WordPress Address and Site Address in Settings > General to the new domain. This logs you out — log back in at the new domain. 2. Update all hardcoded URLs: Use Better Search Replace to find every instance of the old subdomain URL in your database and replace it with the new main domain URL. 3. Move the files: If the subdomain is on the same server, no file move is needed — just update the DNS. If on a different server, copy all files to the new location. 4. Update DNS: Point your main domain to the WordPress installation. 5. Set up 301 redirects from the subdomain to the main domain if the subdomain will remain accessible. For professional migration, see our WordPress Services page.

“The subdomain to main domain move is the final launch step. Do not rush it. Every URL, every setting, every link must be correct.”