Moving your website to a new hosting provider is one of the more stressful technical tasks a website owner faces. Done wrong, a website migration can result in hours or days of downtime, lost data, broken links, and damage to your hard-earned search engine rankings. Done correctly, it is a straightforward process that most website owners can complete in a few hours with minimal disruption. This guide walks you through exactly how to migrate a website safely — from preparation through to final verification.

Before You Start: Preparation and New Host Setup

Good preparation is what separates a smooth website migration from a chaotic one. Before you touch a single file or setting, complete the following steps.

Back up everything. Create a full backup of your website — all files and your complete database — immediately before starting the migration. Even if you have recent automated backups, create a fresh manual backup on the day of the migration. This is your safety net. Store the backup somewhere completely separate from both your old and new hosting — a local drive, Google Drive, or Dropbox all work. For WordPress sites, UpdraftPlus or the Duplicator plugin make complete backups straightforward.

Choose and set up your new host. Sign up for your new hosting account and complete the initial setup before you begin migrating. Set up the hosting plan, create a new hosting account (cPanel, Plesk, or whatever control panel your host uses), create a database for your website if required, and note down all the relevant credentials — FTP details, database name, database username, and database password. You will need these during the migration.

Add your domain to the new host. Add your domain name to your new hosting account, but do not change your DNS yet. Your domain should point to your old host while you set up and test your site on the new one. Most hosts allow you to access the site on the new server using a temporary URL or by editing your computer's hosts file — your new host's support team can guide you through this.

Note your current DNS settings. Log into your domain registrar and take a screenshot or note of your current DNS records — particularly your A record, MX records (email), and any CNAME records. You will need to replicate these on your new host or DNS provider after the migration. Losing your email configuration during a domain migration is a common and avoidable mistake.

Migrating Your Files, Database, and DNS

For WordPress sites: use a migration plugin. The easiest way to migrate a WordPress website is to use a dedicated migration plugin. Duplicator, All-in-One WP Migration, and WP Migrate are all widely used options. These plugins package your entire WordPress installation — all files and the database — into a single archive that you upload to your new host and restore with a few clicks. Duplicator's free version works well for sites under 500MB. For larger sites, a paid migration plugin or manual migration may be necessary.

Manual file migration. If you prefer or need to migrate manually, use an FTP client like FileZilla to download all files from your old hosting account to your local computer. Then upload those same files to the correct directory on your new hosting account. For WordPress sites, all files should go into the public_html directory or whichever directory your new host uses as the web root.

Database migration. Log into your old host's control panel and use phpMyAdmin (or the database management tool provided) to export your database as a SQL file. Then log into your new host's phpMyAdmin, select the database you created during setup, and import the SQL file. For WordPress sites, if your new server has a different database name or username, update the wp-config.php file to reflect the new database credentials.

Test thoroughly before changing DNS. Access your site on the new server using a temporary URL or hosts file modification. Test every page, form, payment process, and critical functionality. Check that images load, links work, and nothing is broken. For WordPress, use the Search Replace DB tool to update any hardcoded references to your old server's URL if they appear. Only proceed to the DNS change once you are confident the site works correctly on the new host.

Update your DNS. Log into your domain registrar and update your DNS A record to point to your new host's IP address. DNS propagation typically takes between 30 minutes and 48 hours — during this period, some visitors will see the old site and some will see the new one, depending on which DNS servers they are using. The lower your TTL (time to live) setting, the faster propagation completes. If possible, reduce your TTL to the minimum allowed (often 300 seconds or 5 minutes) a few hours before changing your DNS.

Keep your old hosting active for 48 hours. Do not cancel your old hosting account immediately after changing DNS. Keep it active for at least 48 hours to ensure all visitors are redirected to the new server before the old account goes offline. Once you have confirmed that your site is fully functional on the new host and DNS has fully propagated, you can safely cancel your old hosting plan.

Migrating a website carefully and methodically results in zero visible downtime for most users and no negative impact on your search rankings. Take your time, test thoroughly, and do not rush the DNS change — patience at that stage is what makes a website migration seamless rather than stressful.