Technical SEO 3 min read

How to Migrate a WordPress Site Without Losing SEO

Moving WordPress to a new host or domain is routine — losing rankings in the process is avoidable. Follow this step-by-step migration plan covering backups, DNS, URLs, redirects and post-launch checks.

On this page

Key takeaways

  • A migration moves files and the database to a new host or domain; done carefully, it causes no SEO loss.
  • Back up, migrate to the new server, test on a temporary URL, then switch DNS with a low TTL.
  • For domain changes, map every old URL to its new URL with 301 redirects and use Search Console’s Change of Address tool.

Moving a WordPress site to faster hosting is one of the best performance upgrades — but botched migrations cause broken images, downtime and ranking drops. Here’s the step-by-step process I follow.

Types of migration#

Type SEO risk Key extra steps
New host, same domain Low Minimise downtime; keep URLs identical
HTTP → HTTPS Low Sitewide 301s; fix mixed content — see SSL guide
New domain Medium 301 every URL; Change of Address in Search Console
New URL structure or CMS High Full redirect map — see site migration SEO checklist

Step-by-step: moving to a new host#

  1. Prepare: take a full backup; lower your DNS TTL to 300 seconds a day before; note PHP version and any server rules.
  2. Copy the site: use a migration plugin (Duplicator, All-in-One WP Migration, Migrate Guru, WPvivid) or your new host’s free migration service — or manually copy files and export/import the database.
  3. Configure: update wp-config.php with the new database details if migrating manually.
  4. Test before switching DNS: use the host’s temporary URL or edit your computer’s hosts file to preview the new server. Check pages, forms, logins, checkout and images.
  5. Freeze changes on the old site (no new posts or orders) during the final sync.
  6. Switch DNS (A record or nameservers) and install SSL on the new host.
  7. Verify: check that the new server responds (look at headers or a test file), resubmit the sitemap, and watch Search Console for crawl errors.
  8. Keep the old hosting for a week or two as a fallback.

Need a hand with this?

Get a quick, honest review of your website’s SEO.

Chat on WhatsApp

Changing domains without losing rankings#

  • Run a search-replace of the old domain in the database (wp search-replace 'https://old.com' 'https://new.com' or Better Search Replace).
  • Add sitewide 301 redirects from every old URL to the same path on the new domain.
  • Verify both domains in Search Console and use Settings → Change of Address.
  • Update Google Business Profile, social profiles, email signatures and important backlinks.
  • Keep the old domain registered and redirecting for years.

Common migration problems#

  • Error establishing a database connection — wrong credentials in wp-config.php; see fix guide.
  • Broken images — old absolute URLs in content; run search-replace.
  • Login loops — wrong Site URL or cookie domain; clear cache and check Settings → General.
  • “Discourage search engines” enabled after copying from staging.
  • Emails stop working — configure SMTP and DNS records on the new host.

WordPress migration FAQ#

How long does a migration take?#

Small sites: under an hour. DNS propagation can take a few hours with a low TTL. Large stores need planning around order freezes.

Will migrating hosts affect SEO?#

Not if URLs stay the same and the site stays online. A faster host can improve performance signals.

Do I need a plugin to migrate?#

No, but plugins and host migration services make it easier and reduce mistakes.

Found this useful? Share it

Join the discussion

Your email address will not be published. Required fields are marked *

Security code image. If you cannot read it, press refresh or contact me on WhatsApp.