How to move a website to another host
Last updated: 26 August 2026 · Reviewed: 26 August 2026 · By: Alston Antony
Moving a website to a new host is a six-step process: back up files and database, provision the new host and match its PHP/MySQL versions to the old one, restore files and import the database, test on a temporary URL or hosts-file preview, migrate email accounts, then cut over DNS with a pre-lowered TTL of 300 seconds. A small WordPress site takes 2 to 4 hours of active work, DNS propagation completes inside 1 to 4 hours on Sri Lankan resolvers, and downtime is zero if the old host stays paid for 72 hours after the switch. Every managed host bundles a free migration plugin or service, so paying an agency to click one is money wasted.
Pre-migration checklist (the 15 minutes that save the whole move)
Pre-migration prep is where a clean move separates from a broken one. Confirm five things before touching anything on the new host: PHP version on both sides matches (or the new host is one minor version higher); the database is under 512 MB (larger stores need chunked import); every custom cron job on the old host is documented (WordPress cron and system cron are different); email accounts are listed with mailbox sizes; and a full backup completed successfully in the last 24 hours. Two failures worth catching now: hard-coded old-host URLs inside the WordPress database, and an SPF/DKIM record on the current DNS that will need to be recreated on the new host to keep transactional email out of spam.
Step 1: Take a portable backup of files and database
Backups are the first move and the fallback if anything goes wrong. In cPanel, generate a full account backup
from the Backup Wizard, which packages home directory, MySQL databases, email accounts and DNS zones into a
single tar.gz file. For WordPress, the free All-in-One WP Migration plugin exports the whole site as one .wpress
file up to 512 MB (the paid Unlimited extension removes that cap). For a static HTML site, download the
public_html folder over SFTP with FileZilla. Verify the backup is complete by unzipping it locally
and checking the size against the disk usage the old host reports. A broken backup taken at 2 am the night of
the move is worse than no backup.
Step 2: Provision the new host and match the stack
Stack matching prevents the most common post-migration failure, plugins breaking silently on a PHP version jump. Log in to the old host and record: PHP version (7.4, 8.0, 8.1, 8.2, 8.3), MySQL or MariaDB version, web server (Apache, LiteSpeed, Nginx), PHP memory limit, upload max filesize, and any custom modules like Redis or ionCube. Set the new host to match, or one minor version higher on PHP. Create the database, database user and password on the new host, and grant the user all privileges on that database. Add the email accounts now too, with the same passwords, so mail migration in step four does not need password resets.
Step 3: Restore files, import the database, test on a preview URL
Restore the backup on the new host and preview the site before touching DNS. For WordPress with All-in-One WP
Migration, install the plugin on the new host and import the .wpress file. For a cPanel-to-cPanel move, restore
the full account backup through the Backup Wizard on the new host. For a manual move, upload files over SFTP
and import the database SQL through phpMyAdmin. Every managed host provides a temporary preview URL like
example.new-host.com; test the site there. If the new host does not offer one, edit the local
computer's hosts file to map the domain to the new IP and preview in the browser without changing public DNS.
Step 4: Move email before or with the web (not after)
Email is where hosting migrations fail loudest. Every mailbox on the old host needs an equivalent mailbox on the new host, populated with existing mail before the DNS MX record moves. On cPanel, the Email Accounts tool exports and imports mailboxes; for larger accounts an IMAP sync tool like imapsync copies mail between servers over IMAP. Recreate SPF (a TXT record listing the new host as an authorised sender), DKIM (a public key TXT record generated by the new host's mail system) and DMARC (the policy record) at the DNS provider. Skip this and outbound mail from the new host lands in spam for a week. The clean pattern is to move email before web, verify inbound and outbound mail on the new host, then move the site.
Step 5: Cut over DNS with a pre-lowered TTL
DNS cutover is a two-part move planned 48 hours ahead. Lower the domain's TTL to 300 seconds at the current DNS provider two days before the switch, so every resolver worldwide caches the record for only five minutes by the time the change lands. On switch day, edit the A record to point at the new host's IP (or switch the nameservers to the new host's nameservers if a full DNS move is intended). Watch propagation on DNSChecker and confirm resolvers on SLT-Mobitel and Dialog return the new IP within an hour. Raise the TTL back to 3600 or 14400 once the switch settles.
Step 6: Verify SSL, forms, cron and analytics inside 72 hours
Verification is the safety net for anything the migration missed. Check the padlock on the new host (Let's Encrypt reissues on the next AutoSSL run, usually inside an hour of DNS resolving to the new IP). Submit the contact form and any WooCommerce test order. Confirm scheduled tasks fire: WordPress cron on a real page request, and any system cron jobs recreated in the new host's cron panel. Log in to Google Search Console and confirm no new crawl errors. Log in to Google Analytics or Plausible and confirm real-time traffic still lands. Keep the old host paid for 72 hours as insurance. Cancel after seven days of confirmed clean traffic.
WordPress-specific tools that actually work
WordPress migration has three free plugins that cover most cases. All-in-One WP Migration handles sites up to 512 MB in a single file, is the fastest option for small sites, and needs the paid Unlimited extension for larger. Duplicator packages the whole site as an installer plus archive and works well for sites 1 to 5 GB. WP Migrate (the free tier from Delicious Brains) is the strongest at find-and-replace on the database and is the safest choice for a site with many hard-coded URLs. Every managed WordPress host also ships its own tool: SiteGround Migrator, Cloudways WordPress Migrator, WP Engine's automated migration plugin, Kinsta's push-to-live flow. When available, the host's own tool is the fastest path because it handles cron, wp-config and the redirect in one step.
Common failure modes (and the specific fix for each)
Five failure modes account for the majority of broken migrations. Hard-coded old-host URLs inside the
database (fix: Better Search Replace plugin before the DNS switch). PHP version mismatch breaking plugins on
the new host (fix: match version on both sides in step 2). Missing SPF or DKIM breaking outbound mail (fix:
recreate in DNS in step 4). Cron jobs not carried over so scheduled posts and backups stop (fix: rebuild the
cron table on the new host in step 2). And WordPress admin locked out because the site URL in wp_options
still points at the old host (fix: run the WP-CLI command wp option update siteurl or edit
wp_options directly before touching DNS).
Frequently asked questions
How long does a website migration take?
A single small WordPress site with the right prep takes 2 to 4 hours of active work, plus 1 to 24 hours of DNS propagation depending on the previous TTL. A WooCommerce store with 500+ products and email needs a full day and a maintenance window to avoid lost orders.
Should I pay for a migration service?
Usually no. Every managed WordPress host (SiteGround, Kinsta, Cloudways, WP Engine, Hostinger) includes at least one free migration through a plugin or their support team. Paid migration services from Sri Lankan agencies charge LKR 8,000 to LKR 25,000 to click the same plugin.
Can I migrate without downtime?
Yes, with two moves: lower DNS TTL to 300 seconds 48 hours before, and keep the old host paid for 72 hours after the switch. Both servers answer during the propagation window, so no visitor sees an outage.
What if the new host uses a different PHP version?
Match the PHP version on the new host to the old host before migrating (in cPanel or the equivalent tool). WordPress runs on PHP 7.4 through 8.3 but many plugins fail silently on a version jump. Change PHP after the migration is verified, one minor version at a time.
Does the SSL certificate transfer to the new host?
No, and it does not need to. Let's Encrypt reissues automatically on the new host once the domain resolves there via cPanel AutoSSL or Plesk. For a paid certificate, download the private key and CSR from the old host and reinstall on the new one, or reissue for free through the new host.
Sources & references
- WordPress - moving WordPress — Official documentation on migrating a WP site (checked 26 Aug 2026)
- cPanel - full account backup — How to generate a portable backup from the old host (checked 26 Aug 2026)
- All-in-One WP Migration plugin — Common free WordPress migration tool (checked 26 Aug 2026)
- Duplicator plugin — Alternative free WordPress migration tool (checked 26 Aug 2026)
- Let's Encrypt - rate limits — How often certificates can be issued during migration (checked 26 Aug 2026)