How to Migrate a Website

Why Trust Techopedia

Learning how to migrate a website to a new hosting provider can be intimidating, especially for those attempting it for the first time. The stakes are high, as a misstep could result in unwanted downtime, data loss, or even a dip in your search engine rankings.

This guide will navigate you through the process, ensuring your website transfer goes without a hitch. We’ll show you how to move your site to greener pastures while keeping your domain live and responsive for visitors.

Key Takeaways

  • Properly migrating a website involves key steps such as backing up data, transferring files and databases, and updating configuration details.
  • Testing your site on the new host before going live can ensure functionality and avoid downtime.
  • Updating your domain’s nameservers is the final step to pointing your website to the new host.
  • Post-migration, it’s important to monitor your website’s performance and fix any issues promptly.
  • Seeking professional help for website migration can alleviate technical challenges and ensure a smooth transition.

Check for Automated Migration Services

Before you roll up your sleeves for the manual labor of website migration, pause and explore the possibility of an automated transfer. Many modern web hosts understand the complexities involved and offer complimentary migration services as part of their welcome package.

Hosts like A2 Hosting and InMotion Hosting offer free migration services, and others like Bluehost and DreamHost perform comprehensive website migration for a small fee. Leveraging these services can be a lifesaver, particularly if you’re not a technical expert.

InMotion Hosting's website transfer service

InMotion Hosting’s website transfer service

How To Use an Automatic Website Migration Service

If you’ve chosen to take advantage of an automatic website migration service, you’re in for a relatively stress-free experience. Here’s how to proceed.

  1. Sign up and request migration

    After selecting your new web host, sign up for an account. During sign-up, look for an option to request a website migration or contact customer support to initiate the process.
  2. Provide the required details

    Your new host will need information about your current hosting setup. This typically includes your website’s URL, the current host’s control panel login credentials, and any other pertinent details.
  3. Backup your website

    Although the hosting provider will handle the migration, it’s wise to create a backup of your site. Use backup tools, such as Backup For cPanel or UpdraftPlus, in advance of migrating.
  4. Monitor the migration

    While the host’s experts work their magic, stay in the loop. They may reach out if they need additional information or to confirm certain steps.
  5. Test the migrated website

    Once notified of the completed migration, test your website on the new host. Verify that all pages load correctly and all functionality is intact.
  6. Finalize the transfer

    If everything looks good, proceed with updating your domain’s nameservers to point to the new host. To do this:
    • Log in to your domain registrar’s control panel. This is where you initially registered your domain name.
    • Locate the section for domain management or DNS settings.
    • Find the nameserver settings. You may see fields for primary and secondary nameservers.
    • Replace the existing nameserver addresses with the ones provided by your new hosting provider.
    • Save the changes
  7. Wait for the update

    It will typically take several hours for your DNS addresses update to be reflected and your website to be visible from the new hosting environment.
  8. Double-check

    Ensure that everything is working as expected. If all is well, the migration process is complete.

Communication with your new hosting provider is key throughout this process to ensure a smooth transition.

How To Migrate Your Website Manually

When an automated migration service isn’t an option, or if you prefer to have hands-on control over the process, manually migrating your website to a new host is the way to go. This gives you full oversight but comes with the responsibility of ensuring everything goes smoothly.

Before you begin, we recommend you make a full backup of your entire website. If your original web host uses cPanel, you can use cPanel backups.

Otherwise, your hosting provider will most likely include a backup tool in the admin panel. If not, there are third-party website backup services like Dropmysite and Backup Machine you can use.

This backup serves as a safety net, allowing you to restore your site to its original state should any issues arise during the migration.

Note: The exact steps you’ll need to take for migration will depend on the technologies your website is built upon and the software your web hosting provider uses. Below, we’ve outlined a migration process that will serve the majority of users, but you should check with your providers for specific details.

1. Add the Domain Name to the New Hosting Provider

The first step in the manual migration process is to add your domain name to your new hosting account. If you’ve signed up for a single-site hosting plan, this was likely part of your initial setup. However, if you’re managing multiple domains, or if you didn’t set it up initially, you’ll need to add it as an Addon Domain. Here’s how:

  • Log in to your new host’s control panel.
  • Navigate to the “Domains” section and find the option for “Addon Domains.”
  • Enter your domain name and fill in any additional required information.
  • Create or specify a document root – the directory that will contain your site’s files. This is usually a subfolder within the “public_html” directory, named after the Addon Domain (for example, “public_html/”).

Once this step is complete, your domain name will be associated with your new hosting account, but it won’t go live until you update your nameservers, which we’ll cover later in the process.

Addon Domains option in the Bluehost administration panel

Addon Domains option in the Bluehost administration panel

2. Use FTP To Move the Site’s Files

Transferring your site’s files is perhaps the most time-consuming part of the migration process, particularly if your site is large. However, the steps are straightforward:

  • Prepare your FTP client: Download and install a file transfer protocol (FTP) client if you don’t already have one. FileZilla is a popular choice that’s free and user-friendly.
  • Gather FTP credentials: Obtain the FTP details for both your old and new hosting accounts. You’ll need the FTP server address, username, and password from each host.

For the Old Host:

  • Connect to your old host using the FTP client.
  • Navigate to the root directory where your website’s files are located.
  • Select all your site’s files and folders and download them to a folder on your local computer.

For the New Host:

  • Connect to your new host using a separate instance of the FTP client.
  • Navigate to the root directory where you want to upload your website’s files.
  • Upload all the files and folders from your local computer to the new host’s directory.

Tips and Best Practice:

  • Maintain the original directory structure to avoid broken links.
  • Keep an eye on file permissions. They should remain consistent during the transfer.
  • If your website is very large, consider compressing your files into a single archive before downloading to save time and then decompress them after uploading.
  • Verify that all files have been correctly uploaded by comparing the file count and size on both the old and new host.

While the file transfer is underway, your site will still be live on your old hosting. Once the transfer is complete, you can proceed with the rest of the migration steps.

FileZilla being used to upload website files to Hostinger

FileZilla being used to upload website files to Hostinger

3. Export the Site’s Database from the Old Host

The database is a critical component of your website, where content, user data, and configurations reside. To move it, access the database management tool provided by your old host, typically “phpMyAdmin,” and then follow these steps:

  • Log in to your old hosting control panel and open “phpMyAdmin.”
  • Select the database that corresponds to your website from the list on the left-hand side.
  • Once the database is selected, click on the “Export” tab at the top of the page.
  • For a straightforward export, choose the “Quick” option and select “SQL” as the format.
  • Click on the “Go” button to download the SQL file to your computer.

Ensure you keep this file safe and secure, as it contains all the data needed to recreate your website’s database on the new host.

Exporting a site database from Liquid Web using phpMyAdmin

Exporting a site database from Liquid Web using phpMyAdmin

4. Import the Site’s Database on the New Host

With your website’s database exported, the next step involves creating a new database on your new host and importing the data.

Create a New Database

Log in to your new hosting control panel and look for the “MySQL” databases section. Use the database wizard, if available, which will guide you through the steps to create a new database. This includes:

  • Naming the database.
  • Creating a database user with a secure password.
  • Assigning the user to the database with all privileges.

Import Database

After setting up your new database, open “phpMyAdmin” on your new host.

  • Select the new database from the sidebar.
  • Navigate to the “Import” tab.
  • Click on “Choose File” and select the SQL file you exported from your old host.
  • Begin the import by clicking “Go.” The process may take some time, depending on the size of your database.

5. Update Configuration Files

After importing your site’s database to the new host, you might need to adjust some configuration files. The specific files and settings you’ll need to update depend on the content management system (CMS) or platform your site uses. Here’s a general approach:

  • Locate the configuration file: For many CMS platforms, there will be a primary configuration file that contains database settings. For instance, WordPress uses “wp-config.php.”
  • Edit the configuration file: Download the configuration file via FTP, and open it in a text editor.
  • Update database connection details: Look for the sections that define the database name, user, and password. Replace the old values with the new ones you created on your new host.
  • Check for other settings: Some systems may also require you to update site URLs, file paths, or server-specific settings. Make these changes accordingly.
  • Upload the updated file: Save your changes and upload the updated configuration file back to your new host, overwriting the existing one if necessary.

Pro Tip: Always back up the original configuration file before making changes so you can revert the file if something goes wrong.

Finding the wp-config.php file for a WordPress installation on Hostinger.

The wp-config.php file for a WordPress installation on Hostinger

6. Test the Site on a Temporary URL

With your files and database transferred and your configuration details updated, it’s time to test your website on the new host before going live. Here’s how to proceed without affecting your live site:

  • Temporary URL: Use a temporary URL provided by your new host to access your website. This allows you to see your site as it will appear once you point your domain to the new host.
  • Edit your hosts file: For a more thorough test, you can also mimic the domain name transfer by editing your computer’s hosts file to point your domain to the new host’s IP address.

Once you’ve set up one of the above methods:

  • Check functionality: Navigate through the website, ensuring all pages load correctly and without errors.
  • Test interactive features: If you have forms, shopping carts, or other interactive elements, test them to confirm they’re functioning as expected.
  • Confirm email services: If you’re using email services through your host, send test emails to ensure they’re working.
  • Look for broken links: Use a link checker tool such as Ahrefs Broken Link Checker to verify there aren’t any broken links on your site.
  • Inspect visuals: Ensure all images, videos, and styling appear correctly.

Note: Keep in mind that if you edited your hosts file for testing, you’ll need to revert those changes after testing is complete.

By meticulously testing your site, you can catch and rectify issues before your audience encounters them. Once you’re confident everything is operating correctly, you’re ready to make the final switch and update your domain’s nameservers to point to your new hosting provider.

7. Update the Domain’s Nameservers To Point to the New Host

Finalizing your website migration involves pointing your domain to the new host by updating the nameservers. To do this:

  • Locate the new host’s nameservers: Find the nameserver details from your new host. They will have been supplied by email on signup, or you can find them on the new host’s website or in the admin panel. They typically follow the format “” and “”
  • Access domain registrar: Log in to the account where your domain is registered.
  • Modify nameservers: Navigate to the domain management section, find your domain name, and look for the option to change nameservers.
  • Update nameservers: Replace the existing nameservers with those provided by your new host and save the changes.
  • Wait for the update to take effect: Nameserver changes can take up to 48 hours to propagate globally, though it usually happens much more quickly. During this period, your website and email services may experience intermittent availability.

By completing these final steps, your website and email services will now be fully operational on your new hosting provider. It’s advisable to monitor your website closely for a few days after the migration to ensure everything continues to work as expected.

Summary – How to Migrate a Website

Migrating a website to a new host is a task that demands attention to detail, from backing up your data to updating configuration files and testing every aspect of your site post-transfer.

However, it’s a process that can dramatically improve your site’s performance, enhance security, and cut costs.

While careful planning and execution are critical, don’t hesitate to seek professional assistance from the best hosting providers if the process seems daunting. Once your migration is complete, continue to monitor your site to ensure you maintain optimal performance.


What should I do if my website isn’t working after migration?

How long will it take for my domain’s nameserver update to take effect?

Related How To’s

Related Terms

Richard Sutherland
Technology Expert
Richard Sutherland
Technology Expert

Richard brings more than two decades of computer science, business operations, and full-stack development experience to Techopedia. A Computer Science graduate and former Samsung IT support manager, Richard has taught courses in Java, PHP and Perl, and created code for the public and private sectors. A prolific B2B and B2C tech writer, Richard has worked for Samsung, TechRadar Pro, and more.