A Step-by-Step Guide to Switching Hosting Companies

A Step-by-Step Guide to Switching Hosting Companies

If you run websites for any length of time, you’ll find that eventually you need to change hosting companies.  Whether it is because your hosting needs have outgrown the company, their service levels have gone down, or you just found a better deal somewhere else, it is important to know how to switch hosting companies properly.  When done correctly you can have no down time for your sites, and complete the entire process quite quickly and easily.

The following guide will help you to complete your website moved over to your new hosting without visitors to your page ever knowing that you changed a thing.   While your new host may be willing to help with the transfer, it is a good idea to know how to do it yourself as well.  It can save some money, and it also gives you additional flexibility.  When you’re ready to make the change, follow these steps:

  1. Sign up for your new host – Signing up for your new hosting account is the first thing you should do.  Getting everything set up and ready to go can take some time, and you want to keep everything up and running on your existing hosting account until you are ready to make the move.  DO NOT cancel your existing hosting account, or even let them know that you will be canceling soon.
  2. Move Your Files – Once you start this process, you want to make sure you have sufficient time to complete the entire move.   This is especially important if you are running a site which utilizes user submitted content such as forums.  In order to move your files, you’ll need an FTP (file transfer protocol) program.  One of the easiest to use is FileZilla.  It is free, and can be downloaded HERE if you don’t already have it.  It is a free program.
    1. (2a) Once FileZilla is downloaded, open it up and sign in to your old hosting server.  You place your website address in the host box, the username set up for your FTP account in the username box, and your password in the password box.  Most sites won’t require a Port.  If you don’t have access to this information, contact your old host to get this  information.
      WebHostingPeople
    2. (2b) Browse to the files for your website.  In most cases the files will be in the /public_html/YourSite folder. ftp2 WebHostingPeople
    3. (2c)Create a folder on your hard drive to temporarily hold all your website files.  Once created, drag the entire folder from the website hosting area to your folder on your hard drive:ftp3 WebHostingPeople
    4. (2d) Depending on the size of your website and the speed of your Internet connection, this could take quite some time.   You’ll see all the files and folders opening and changing quickly during this process.  This is completely normal.
    5. (2e)Once the files have been backed up on your hard drive, it is time to move them to your new hosting server.  Essentially, we will perform the same steps in reverse.  First, connect to your new host via FTP.  You should receive your FTP information in an email from the new host.
    6. (2f)Once connected, drag the entire folder from your hard drive to the public_html areaWebHostingPeople
      1. (2g)The files will begin to upload onto your new website host.   Moving these files is the most time consuming tasks, so while this is happening, you can move to the next steps.
  3. Backup Databases – Almost all types of websites use databases to store and display data.  You need to back up your existing database so you can move it to the new hosting server.  If you have access to cPanel (access instructions will be available from your old host) log in to that, and find the phpMyAdmin icon:
    WebHostingPeople
  4. Click that icon, which will load up your phpMyAdmin page.  Your website’s database will be listed along the left hand side.  If you only have one website you are moving, you can just click export at the top.  If you have more than one on this hosting account, you’ll need to back them all up individually.  Click on the database you wish to back up:WebHostingPeople
  5. Click Export:WebHostingPeople
  6. For most sites, you can use all the default settings.  If you are an advanced user, you can choose some customizations, but it is typically not necessary.   Export method can be left as quick, and format should be SQL:WebHostingPeople
  7. When you hit go, it will download a file to your computer.  It will be named your_database.sql.  Just keep track of where that database has been saved, you’ll need it in a moment.
  8. Now, you need to get to the phpMyAdmin for your new server (also in cPanel, or whatever hosting interface you use).  Now, create a new database, with the same name as the one on your old server.  This can be done by finding the databases section, and clicking on MySQL Databases:
    WebHostingPeople
  9. Name the database, and click create:WebHostingPeople
  10. Create a username to access that database.  This username (and password) must be the same one which was used to access the database on your old hosting account.  Depending on the type of website you are moving, this information can often be found in the functions.php file.  If you need assistance finding your specific username & password, reach out to your old hosting company’s tech support.WebHostingPeople
  11. Add the user you just created to the database you just created:WebHostingPeople
  12. Choose to give the user all rights to the database when prompted.
  13. Now that the database is created, it is time to add the data from the old site onto this new one.  Go back to the phpMyAdmin page, just like before.
  14. This time, click Import at the top:WebHostingPeople
  15. On the next screen, you need to choose the database file saved from before.  All the other settings can remain the same:WebHostingPeople
  16. Follow the step-by-step instructions on the screen until the database is imported.
  17. Your website has been moved (though users are still going to access it on the old host), now it is time to test it.  In order to test, you need to get the IP address of your new hosting.  This typically comes in an email when you sign up.  To test, simply type in the IP address into any browser, followed by “/YourSite/” where Your Site is the name of the folder we created in step 2F.  So, in the browser you will see something like this:WebHostingPeople
  18. If everything works properly, you should see your page.  Note that not everything will work like normal because some links on your site won’t use the IP address.  If the site looks normal on the front page, however, everything should be all set.
  19. Update DNS – DNS is the technology the Internet uses to make sure people get to the sites they want when they type in an address.  Currently, the internet directs people who type in your URL to your old host.  To update this, you need to go to the site where your domain is registered.  This could be a site like goDaddy, 1&1, NamesCheap or any others.   Each domain registrar is different, so identify the specific instructions from your specific company.  The process, however, is largely the same.
  20. Locate the Name Servers Setting – Once you’ve found where you can edit your name servers, update them to the name servers of your new host.  Typically it will be something like “NS1.yourhost.com” and “NS2.yourhost.com”.  Almost all hosts provide two name servers, and these will typically come in an email from your hosting company.
  21. Once entered and saved, it can take up to 48 hours for all traffic to be directed to your new website.  Typically it only takes a few hours for most traffic though.
  22. Wait 48 hours, and test all the functionality of your site.  If it is working properly, you can canel your old hosting service.

Leave a Reply