How to Migrate to a New Host
The reasons to transfer your website to a new web host can vary. Maybe your current web host can no longer handle the needs of your website. Maybe you’ve found a web hosting company that offers a better deal than your current provider. Whatever the reason, migrating to a new host doesn’t have to be difficult.
On this page, we walk you through the process step-by-step so that when you choose to transfer your website, you’ll be able to do so as smoothly as possible.
Step by Step: Migrating Your Website to a New Host
Migrating your website is a lot like moving house. Once you’ve picked a new location, you want to make sure you pack up everything carefully, coordinate how to transfer your belongings, and update your address so people know where to find you.
Below, we walk you through the process of migrating your website to a new host step-by-step so that you’re able to transfer your website to a new web host without any problems.
Find a New Web Host
There are plenty of reasons why people choose to transfer their website to a new web host. It may be that your current web host can’t handle the increase in your website’s traffic. They may not be able to offer the level of security your website needs. Or maybe you’ve just found a better deal with a different web host provider.
Your first step will be finding the web host. There are thousands of web hosting companies out there, so make sure you assess your website’s specific needs before looking for a new host. It can be helpful to take the time to find the right fit now so you don’t have to migrate your website again in the future.
Most importantly, you’re going to want to make sure that you’ve purchased your new hosting plan before you begin the migration process. Think of it like buying a new house before packing up all of your belongings for the move. You need to know where you’re going to send them.
However, do not cancel your old hosting service yet. Make sure to keep that account active so that your old web-hosting provider does not terminate your site before its been fully transferred.
Learn more: Complete Guide to Web Hosting
Backup Your Website
Once you’ve determined who your new web host is, you’ll need to backup your website and export those files to your computer. It’s important to always store these files off-server (so on a hard drive or in the cloud), so that you don’t lose them when your account with your old host becomes inaccessible.
There are two elements you will want to backup during this process: Your website’s files (theme, images, code, etc.) and your website’s database (website settings, users, posts, comments, etc.).
There are a couple of different ways to do this:
Use Your Hosting Control Panel. More than likely, your current web-hosting provider includes tools to backup your website with a few clicks. The process varies between providers, but is usually done using automated tools like cPanel, Hostinger, or GoDaddy. Check with your current webhost to determine which you need to use.
Manual Backup. You also have the option to manually backup your website. While more involved, this method is a good choice if your current web host doesn’t offer any automated tools or if you just want to control the transfer yourself.
- To back up your files, download an FTP client, connect your FTP though your hosting dashboard, and locate the “public_html” folder. You’ll be able to drag the files onto your computer from here.
- To back up your database, open “phpMyAdmin” from your current hosting control panel. From here, you should be able to select your website’s database to export. Make sure you choose the “quick” method and download as a “.sql” file.
Use WordPress Plugin. This is recommended if your site is on WordPress. Luckily, there are a couple of different migration plugins that allow you to export your website as a file to your computer. Simply install the plugin on your old site to download the file. Once you have a new host, you’ll install WordPress and the same plugin there, and import the file.
You can find links to both of these plugins below:
Move Files and Data to Your New Host
Once you’re set up with your new web host, you can then move upload your files and database.
To upload your files, download an FTP client to easily move your files from your computer to your new web host. Once installed, use your new host’s FTP credentials to connect. Then, you’ll drag all of your website files to the open directory where your website is going to live. Usually, this is the “public_html” folder.
To import your database you will need to create a “container” on your new host. Usually, you’ll be able to find this in the host’s control panel (cPanel) as “MySQL Databases” or something similar. Create a new database, then create a new user for that database, and assign that user with “All Privileges.” From here, you’ll be able to import the data from your “.sql” backup file you downloaded from your old website.
Update Configuration Files
Once your website’s files and database are uploaded into the new host, you’ll need to update the site’s configuration files. Think of it like submitting a change of address with the post office after you move. You need to change your old host’s database credentials to your new host’s database credentials.
In order to do this, log into your new host’s cPanel. You’ll be able to locate your new credentials under “MySQL Databases” (this is where you imported your database to your new host). You will need your:
- Database name
- Database User
- Password
- Database Host
You will then edit your configuration file and replace the old credentials with your new credentials. Save these changes and then re-upload the file to your new host. (This will re-write the old version.)
Test Your Website
In order to migrate your website as quickly as possible, it’s important to test it before you update your Domain Name System (DNS). Basically, you want to trick your computer into thinking your website is already on the new server so that you can make sure it’s working properly before your site is terminated by your old host.
You can do this by editing the site’s hosts file with your new web host’s IP address. You’ll want to add a line at the bottom of the file with your new IP address and domain. Save the file, flush your DNS cache (if applicable), and if the site is working properly, you should be able to open it in a new incognito window.
When you can see your site, you’ll want to make sure:
- There are no broken links/404 errors
- Your website’s SSL is operating
- The database is connected
- Your email is able to send and receive emails
- Any user-accessible forms and logins are working properly
Update Domain Name System (DNS)
Once you’ve determined that your website is working on your new web host, you will need to go in and update your domain registrar with your new Nameservers. You can find these in your new hosting account by looking for “Nameservers.”
You will then update these records with your domain registrar (the company where you bought your domain). While it may look different from registrar to registrar, each usually has a section titled “Nameservers” or something similar, and you can update the information there.
Wait for Propagation and Finalize
Changing your DNS isn’t instant, so don’t expect your site to fully work on your new host for up to 48 hours. This time frame is called “propagation,” and while it can sometimes take only an hour or two, more often than not it takes a couple of days.
Use DNS Checker to keep track of when your records are updated. Once complete, make sure your SSL certificate is active. If so, your site is ready.
It’s generally advised to wait at least 3 days before canceling your old web host. Is this is to ensure that you don’t lose any important website traffic during the switch.
Web Hosting with Northwest Registered Agent
At Northwest, we offer open-source web hosting with flexible plans, privacy protection, and human help. Take advantage of our super-fast load times, reliable hosting, and access to up-to-date WordPress features. And best part? You can bring your own site or build it here, with us.
All of our plans include 1 free domain, SSL certificate, and Domain Privacy.
| Essentials | Plus | Pro | |
| Storage | 5GB | 50GB | 100GB |
| CPU Core | 2vCore | 3vCore | 4vCore |
| Memory | 500MB | 1GB | 4GB |
| Bandwidth | Unlimited | Unlimited | Unlimited |