Steps to migrate your website to a new web hosting service (all on your own)

For the past several years, I have over paid for basic web hosting at $7.95 per month. Just recently I switched to Hostgator under similar subscription services for the rate of only $3.00 per month! Wow! Although Hostgator offers free webhost transferring services, you will need to provide passwords to your cPanel, email, and database in order to make the transfer possible. That seems fine because HostGator is a reputable company, but I would prefer to keep all of my passwords to myself. Furthermore, since it has been a while since I last worked on my website, I wanted a bit of a refresher.  

While there are many guides on how to migrate your website out there, I found that most of them fall short in covering all of the needed steps to completely migrate web hosts. Fortunately, I documented the steps that I took and documented them here so that future-me or you can benefit from a smoother web host migration!

Bear in mind that you may have other features or services that you need to set up during your migration process.  Before taking the steps above, check if you have the additional services to migrate.  For example: SSL certificates, security services, SEO/analytics, backup wizards, and more? 

Here are the steps I took to backup my simple WordPress site: 

1. Activate the new web host

It’s a good idea to make sure that the package you are purchasing supports the same technology. For example, check that their servers offer the same version of PHP that your site requires.

2. Backup the current web site

There are various ways to do this, but this is how I did it. 

  1. Log into cPanel for my old site.  Just log into the web host account and look for the cPanel link.
  2. Go to ‘File manager’. Zip and download all files (especially important is the “public_html” folder. which contains all of my web’s public content.).   
  3. Back at the cPanel main menu, go to your ‘mySQL Databases’.  Export your entire SQL database. Also, double-check your SQL database username and password, and write it down. 
  4. Check your webmail. If possible, back up emails and download them. 

3. Import files to the new web host server

This is the reverse of Step 2: 

  1. Log into cPanel for the new web host.  
  2. Go to ‘File manager’, upload the zipped files and extract all files.  Replace anything with similar file names. 
  3. Go to “mySQL Databases’, and Import the SQL database file.  Set the same username and password used from the old web site. 
  4. Set up an email account, ideally using the same username and passwords so that any linked webmail services you use can continue to forward or retrieve emails without interruption. 
  5. Get the new web host’s domain name server address (there are 2). 

4. Domain nameserver change

This step will point all web traffic from your old web host to your new web host service site.  The change is not immediate, but the domain service will offer an estimate on when the swap will take place. 

  1. Log into to the domain service account. 
  2. Update the domain name server addresses to the new web host’s name server addresses.

5. (optional) Update PHP version on WordPress

If the web host is using a newer version of PHP, you’ll need to log into WordPress and update the PHP version.