How to Move a Website to a New Host

Trying to figure out how to move a website to a new host without breaking anything, causing downtime or any other issues that could hurt your Google rankings?

As with any move, moving your site to a new host can feel a little daunting, especially if you haven’t done it before. However, it doesn’t have to be, and with the tutorial that we’ll share in this post, you should be able to move virtually any website to a new host.

A quick note here – in this post, we’re focused on a generic process for how to move a website to a new host that will work for all websites, including WordPress, Joomla, Drupal, etc.

Before getting started, we recommend taking a full backup of your site using whichever method is available. While this process shouldn’t break anything, it’s always good to have a recent backup in hand when making any major changes to your site.

Add your domain name at your new host

Before you can start moving your site, you need to sign up for your new host and add your site.

If you only have one site, you probably entered your domain name already when you signed up for your host. However, if you have multiple sites, you might need to create an Addon Domain instead *:

* Addon domains are what cPanel calls additional domain names – your host might use different terminology if it doesn’t use cPanel.

Move your site’s files using FTP

Next, you need to move all of your site’s files to your new host. This might take some time if you have a large site, but you’ll only need to put in a few seconds of manual effort – the rest is just waiting.

The easiest way to move your site’s files is via FTP. To connect via FTP, you’ll need an FTP program – FileZilla is a good free option if you’re not sure where to start, but there are lots of good FTP clients.

In addition to your FTP program, you’ll also need the FTP credentials (host, username, password, port) from both your old host and your new host. You should be able to find these in your hosting dashboard, but you can ask your host’s support staff for help if needed.

Export your site’s database from your existing host

There are two parts to most websites:

  1. Your site’s files, which you moved in the previous step.
  2. Your site’s database, which usually contains all of your site’s content and settings.

If you just have a static HTML website, you don’t need to move your database because your site doesn’t have a database.

However, most content management systems (CMS) rely on a database to store your content. This includes:

  • WordPress, Joomla, Drupal, Magento, etc.

To move your database, you’ll first need to export your database from your existing host. Then, you’ll import it to your new host in the next step.

To export your database, you can use phpMyAdmin, which is a database admin tool that most hosts offer. If your current host uses cPanel, you should see a phpMyAdmin tool in the Databases section.

Once you open phpMyAdmin, you’ll need to select the database for the site that you want to move on the left (you’ll see multiple databases if you host multiple sites).

Then:

  • Go to the Export tab
  • Select Quick for the Export method
  • Choose SQL for the format
  • Click Go to export your database

Import your site’s database to your new host

Once you’ve exported your site’s database from your old host, you need to reverse the process and import it to your new host.

Before you can do that, you need to create a new, empty database at your new host. If your host uses cPanel, you can do that by opening the MySQL Database Wizard tool under the Databases section in cPanel.

Update any necessary configuration details (depends on CMS)

Again, it’s hard to give specific instructions here because this step will depend on your CMS and how it’s configured.

However, at this point, you might need to update some configuration details in your site’s configuration files or settings to point to the new database that you created (especially if you used a different database name, username, or password).

Test your site

At this point, your site should be working on your new host. However, you’ll want to thoroughly test it to make sure it is.

You can’t do this by entering your site’s domain name because your domain name still points to your old host (for now). This is necessary to ensure that you don’t have any downtime during the move.

Move your email addresses (optional)

If you’re using email hosting from your old host to create a custom email address – e.g. james@jamesphotography.com – you’ll also want to set up this email address at your new host before you make the switch.

Otherwise, you won’t be able to receive emails once you update your domain name in the next step.

Update your domain name to point to your new host

Once you’ve verified that the migrated version of your website is working properly, the final step in how to move a website to a new host is to update your domain name to point to that new host.

When you make the update, visitors will be taken to the new version of your site at your new host, with no downtime.

Typically, you’ll do this by changing your domain’s nameservers, which you can control from the service where you purchased your domain name.

First, you’ll need to locate the nameservers for your new web host. You can usually find these in your hosting dashboard or welcome email. Or, you can ask your new host’s support staff for help.

Your nameservers will look something like this (but unique for each host):

  • ns1.yourhost.com
  • ns2.yourhost.com

Most hosts provide two nameservers, but some will give you three or four different nameservers.

Test everything again

Now, you’ll need to wait for a little for the change that you made to your nameservers to take effect. This can take up to 24 hours, but normally it’ll only take 30-60 minutes.

Once the change takes effect, you should be able to access the version of your site at your new host when you go to your domain name.

Take another moment to make sure that everything is working:

  • Browse around to different pages
  • Test your forms
  • Make sure you can receive emails (if using custom email addresses)
  • Etc.

If everything is still working, you’re officially finished – that’s how to move a website to a new host without any downtime!

Anjali Punjab

Anjali Punjab is a freelance writer, blogger, and ghostwriter who develops high-quality content for businesses. She is also a HubSpot Inbound Marketing Certified and Google Analytics Qualified Professional.