How-toWordPress
How to migrate a WordPress site
- Reading time
- 7 min
- Last updated
- 25 Sep 2026
Migrating WordPress is mostly about sequence. Copy everything, test it on the new host while the old one is still serving traffic, and only then move DNS. Do it in that order and nobody sees an outage.
-
01
Back up everything first
Both halves: the files (
wp-contentespecially) and the database. Take the backup from the old host and download it to your own machine — not just to the old server. A migration backup stored only on the server you are leaving is not a backup. -
02
Copy the site to the new host
Three routes, in order of how much control they give you:
- Ask us. Free managed migration on every plan — send credentials and we move it, usually the same day. Most people should stop here.
- A migration plugin. All-in-One WP Migration or Duplicator. Fine for small sites; large ones hit upload limits.
- Manually. Upload files over SFTP, export the database with
mysqldump, import via phpMyAdmin, then updatewp-config.phpwith the new database name, user and password.
-
03
Test before DNS moves
This is the step that prevents downtime, and the one people skip. Edit the
hostsfile on your own computer so only you resolve the domain to the new server:203.0.113.10 example.in www.example.inOn macOS and Linux that is
/etc/hosts; on Windows,C:\Windows\System32\drivers\etc\hosts. Now browse the real domain on the new host while everyone else still gets the old one. Check the homepage, an inner page, a form, the admin login and any payment flow. -
04
Move DNS, then clean up
Lower the TTL a day in advance, then change nameservers or the A record. Keep the old hosting running for at least a week — DNS caches clear at their own pace and some visitors will still land there.
Once traffic has fully shifted: run AutoSSL on the new host, re-save permalinks in Settings → Permalinks, and remove the
hostsfile entry you added.
What usually goes wrong
- Hard-coded URLs. If the domain changes too, the database is full of old absolute URLs. Use WP-CLI
search-replace, which handles serialised data — a plain SQL find-and-replace corrupts it. - PHP version mismatch. A site running on PHP 7.4 may fatal on 8.3. Match the old version first, then upgrade deliberately.
- File permissions. Folders 755, files 644. Wrong permissions after an SFTP copy show as media upload failures.
- Mixed content. Moving from HTTP to HTTPS at the same time means the search-replace has to cover the protocol too.
- Email. Covered in the DNS guide, and still the thing most likely to bite you.
Protecting rankings through a move
A same-domain host migration should cost you nothing in search, provided:
- URLs stay identical — same paths, same trailing slashes.
- The site is not accidentally left with Discourage search engines ticked on the new host.
robots.txtcomes across and does not block the site.- Response times do not get worse. If the new host is slower, that is a ranking change.
Watch Search Console coverage for a fortnight afterwards. A jump in crawl errors is the early warning.
Common questions
→Read next
→Hosting for this
Plans that fit what you just read.
Every plan includes free SSL, free managed migration and a GST invoice.
→Get started
Hosting that does this for you.
Free managed migration, free SSL, and engineers who answer in under two minutes.