An Ultimate Guide to switch from one web host to Another

  • An Ultimate Guide to switch from one web host to Another

Switching your website from your old web host to a new web host can be a challenging and stressful experience, but it doesn’t need to be. Many of the people have problems with their current web host and stay in the relationship with them even they are unhappy.

They are either unaware of the switching process or afraid from long downtimes which might cause them a loss. To get out from this stressful task, people will either pay a professional to switch their website for them, find a new web host that offers the switching service with a new hosting package or take the third option of having a go at it themselves.

But in reality, migrating is nothing to be concerned about. It can be a very straightforward project if correctly approached and can easily be reversed out of should any problems occur.

There are, however, some pretty good tips to avoid mess when transferring a website to a new host server. These tips are relatively easy to do as long as the site owner has a general knowledge of cPanel, IP addresses, and more advanced FTP login routines that will enable them to work on a new web hosting plan configuration before DNS is altered and transferred to the new host.

In general words, we can say that switching a web host is like shifting your home to new location. As you buy new land, sign the papers, pack your belongings and move it to a new home.

Similarly, Buy new hosting space(it can be Shared Hosting, Reseller Hosting, Dedicated Server or VPS Hosting), Backup all your files and databases and restore it to the new web host. Then finally point your domain to new servers.

Now let’s run through the behind scenes of switching your website from old web host to new one:

#1. Find out New Web Host

The very first step you need to do is find a new hosting company. With web hosting, you often get what you pay for, but many more expensive hosts can have poor support. And there is a variety of hosting companies out there with a variety of configurations.

Primarily you’ll need to evaluate requirements for your website. Have a look on detailed Guide of how to choose your next right web host?

Tip: Make sure not to cancel with your old hosting provider, and do not tell them you will be canceling. Keep this a secret from your old web host, or they could prematurely terminate your website and cause downtime. When you have verified everything and transitioned it properly only then, you should cancel the old hosting plan.

#2. Download and Upload your Backup Files

The very first step of any project such as this is to back up every aspect of your site. Now you have hosting accounts with two different hosting providers (the old and the new one). You would now transfer your whole website from old host to the new host.

A site is usually made up of one or two things:

  1. Files (.htm, .html, .jpg, .gif, .php, etc)
  2. Databases

The website (the files) is the easiest thing to move to your new web host. There are two steps:

  1. Download (via FTP) all the files from your current host, then;
  2. Upload (via FTP) all the files to your new host.

Note: You can also check here FTP Guide to upload and download files using Filezilla.

Static websites don’t have databases, in that case, you can only download and upload files using FTP. For Dynamic websites who have databases, and there are three steps to moving a database to another web host, and you’ll need to do these steps for each database you have.

  1. Export the database to an SQL text file from your old host.
  2. Import the SQL text file into your new host.
  3. Update your website files/scripts with the details of your new database if needed.

The first two steps in moving your database will differ greatly depending on the type of database you have. The most commonly used database system is MySQL, and most web hosts use MySQL along with a web-tool called phpMyAdmin, which is a web interface that you can use to export and import databases.

Note: Check steps here to backup your MySQL Database using PHPMyAdmin

Updating your Website/Scripts:

Your website and scripts will need to update to use the new name for the database, as well as username/password to access it, and may also need to know the new hostname of the MySQL server and its port.
These are all details you should be able to find in your new host’s control panel or ask their Technical Support if you’re not sure.

#3. Make Sure the Databases Work Properly

Let me clear you one thing that the backup files don’t have the information regarding database usernames, their passwords, and permissions associated with each MySQL database. You need to enter this information within your cPanel.

If you are using the WordPress for your website, then You can edit the same configurations in wp-config .php file.

1. Change The Database Name:

Find the following line:

 define('DB_NAME', 'db_name');


Change db_name portion of this line with MySQL database name of your old web host. And change DB_NAME portion of this line with the new database name.

2. Modify the database username:

Locate the following line:

define(‘DB_USER’, ‘db_user’);

In this line, you need to change the db_user portion from the username of your old host to match the new username you have just created.

3. Change The Database User Password

Finally, edit the third line:

define(‘DB_PASSWORD’, ‘db_pass’);

As with the others, the db_pass section of this line must be changed to the new secure password you created for your MySQL user.

Save wp-config.php and close the file.

#4. Test Your Website

After you’ve uploaded your site files and restored your databases (if applicable), your next step will be to test your site. You can test your site using your account’s temporary URL.

If testing through the temporary URL will not work for your site (some CMS applications do not function properly through the temporary URL), you can use an edit your host’s file instead.

Note: If you are not aware of temporary URL with your new web host ask their Technical Support.

#5. Setting Up Email Accounts

Now if you have email accounts with your domain name like [email protected], then now it’s time to set up your email accounts at the new web host.

If you are using a third party email service such as Google, you’ll need to update the MX records in your new cPanel and ensure “remote mail exchange” is set. No need to create email accounts on the new server as they reside on the third party providers servers. Please check our tutorial on modifying MX records in cPanel for more knowledge.

If you are using email accounts on web host server, then you need to move the emails from the server also. Firstly you have to create new email accounts and configure the new email agent. Check here how to create new email accounts in cPanel.

#6. Switch to New Name Servers

The final step of the process is simply to tell the domain name to show files and data on a different server than the one in current use.  After you’ve migrated your website to your new web host and set up your email addresses, you’ll now want to point your domain name away from your previous host.

This is done by logging into the domain registration control panel provided by the domain registrar. Changes to the DNS records will take effect in 24 to 48 hours in most cases, though some have experienced as little as six hours.

During this time, both the new and old websites will function properly, and customers will see identical content no matter which hosted files are presented.

During this 48 hours window, you should avoid making any changes to your website as you may be changing the old version of the site.

After the 48 hours have passed, your updated DNS will be fully functional. You will now contact your former host and cancel your hosting account with them. If you originally bought your domain name from the old host, do not cancel your domain registration.

Alternate: Free Website Transfer by your New Web Host

The migration process mentioned above can seem so challenging to you. Don’t worry we have a backup option for you. You can just choose a new web host who provides free website migration to you.

It is heart loving offer given by some hosting providers to grab the new customers. It will give you easier sleep at night when you do go through the process of transferring your website!

Many hosting companies, including some good ones that I recommend InMotion Hosting, Hostgator, A Small Orange, etc., etc. really, will help to migrate new customers websites to their servers for free.

Wrapping Up

As you can see, when broken down into the above simple steps, the process isn’t that difficult.  All it requires for you to be careful at each step. Be sure to test the website and ensure that all features are working properly; when everything is working just like it used to, then you can cancel the old hosting plan. That’s all there is to it!

Have you migrated your website recently? Let us know your experience with the process in the comments section below!


About the Author:

Anuradha is the co-founder of, a website specially designed for Web Hosting Shoppers who are looking for effective tips for blogging and reliable hosting reviews. She developed the interest in web hosting and search engine optimization. Anuradha has been in web hosting industry for four years. She loves engaging on Twitter, Facebook, and Google+. In her free time, she loves eating new foods, reading books and spend time with her family. Connect with Anuradha on Facebook @chawlaanuradha.

One Comment

  1. pranita deshpande April 10, 2017 at 11:10 am - Reply

    since 2 years i am working on my site but still i am getting hard to get revenue ,can u work for analytic & ad sense i will paid you after getting payments. or you become my partner for long life for statical work . visit my site & study details to bring revenue & drop me mail.

Leave A Comment