1. Home
  2. Computing & Technology
  3. PHP / MySQL

How To Move Your Website When You Change Hosting Companies
Making sure everything works at your new host

By Angela Bradley, About.com

There are several reasons you may want to change your hosting company. Perhaps your old one has downtime, not enough space, or is closing. Regardless of your reasons, moving your website doesn't have to be a scary experience.
  1. Download everything from your current host, including making a backup of databases

  2. Upload everything to your new site. Most hosts allow you to upload via the IP address before you change your DNS. If you don't want downtime, try to get this done before you old hosting is gone and your DNS is changed.

  3. After you re-setup your databases, you need to change the files that point to it. In many PHP scripts this is all held in a configuration file, often called config.php

  4. Once everything is uploaded and setup, it is time to change your DNS. This can take up to three days to take effect. Often times over the next couple days it will seem to switch on and off the new hosting, before finally settling there for good.

  5. Test everything on your site. Occasionally you will have issues if the new host has a different version of PHP or MySQL than your old host. If this is the case you may have to alter your code slightly, but usually you should experience no problems.

  6. Cancel your old hosting, you are officially moved!
More PHP / MySQL Quick Tips
Explore PHP / MySQL
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. PHP / MySQL
  4. PHP/MySQL Basics
  5. How to Move a Hosted Website

©2009 About.com, a part of The New York Times Company.

All rights reserved.