WWW FAQs: How do I move my site to a new web host?


2006-10-17: If your website is still up at the old site, moving to a new host is not too difficult. Just be sure to follow all of the steps in the right order.

First, download all of your website's files, via FTP or SFTP or the method recommended by your web host for moving files back and forth. If you don't know, then you probably had a designer do all of this work for you. Get your designer involved in moving your site. If you are no longer in touch with your designer, you'll need to dig up the username and password for your web hosting account and learn enough basics to use them. If you don't have that account information, you will have to contact your web host and prove your identity to them in another way. See my article I took over a website. How do I change it?

When you hire a web designer to build your site for you, always require them to provide you with a backup copy of your website's files. Also make sure you have copies of all account information, and that you, not the designer or hosting company, are listed as the legal owner of the website in the WHOIS database so that there will never be any legal question as to who owns the site. Remember, although most web professionals are responsible people, both web designers and web hosting companies can disappear without warning!
Second, if your website is database-driven (most membership-oriented websites, bulletin board websites, community websites, etc. are database-driven), you will need to download a copy of your database as well so that you can recreate it on a new web host. This is a trickier process, one that varies from one database to another. Those who are using PHP and MySQL can use a utility called mysqldump if it is installed on the web host. It is also possible to create backup files using PHP alone. For more information, see the article Using PHP To Back Up MySQL Databases on the PHP MySQL Tutorial website.
If your existing website depends on PHP and MySQL, and you are not comfortable with them yourself, contact your web designer or find a new one to back up your database for you. It's not a task you want to do incorrectly!
Third, arrange for hosting with your new hosting company. Don't do this until you have finished backing everything up! You or your new hosting company will need to make DNS server changes in the WHOIS database, by logging into your DNS registrar's website. (This is the site where you first registered your domain name— GoDaddy, register.com, Network Solutions or another registrar.)
If you didn't register your domain name originally or don't have the logon information for your registrar's site, you can place an order to move your domain name to a new registrar such as GoDaddy. You should receive a confirmation email at the old contact email address for the domain. If you don't respond to that email correctly your domain registration will not be moved. Some registrars also allow you to prove your identity by other means, such as a driver's license. Unfortunately, if your name does not appear at all in connection with your domain name in the WHOIS database, you may have to register a new name. Alternatively, you could take legal steps to deal with an uncooperative web hosting company.
Changing the DNS server settings will allow users to find your site at the new host. And once you do that, accessing the site on your old host won't be possible. That's why you must do your backups first.

Once you have signed up for hosting with a new provider, just upload the files you downloaded from the old provider. If you have a database, you will also need to read your backed-up database data into the database on the new server. Again, see the article Using PHP To Back Up MySQL Databases for information on how to restore a MySQL backup.

When Your Old Host Does Not Cooperate

Here I've assumed that your old web host is cooperating, at least until they know what's up. But what if you don't have the login information for your old site, and your host won't give it to you?

In this case, consider mirroring your site. "Mirroring" is saving a copy of your site with a program that automatically "crawls" through the site, much like a search engine indexing program does. For more information on how to mirror a website, see my article how do I mirror another website?

Once you have mirrored the site, you can upload those files to the new provider. You will probably have to fix links and deal with some breakage as websites are not necessarily designed to be convenient to mirror in this way.

If Your Website Is Already Gone

If you have cancelled service with your old host already, they have probably deleted your files. That's the professional thing to do, after all— those files don't belong to them.

However, if you're desperate, you can try asking them to reinstate (and pay for) your account. Then you may discover that they are able to locate your files after all. Just promise me you'll keep a backup of your website's files next time!

Moving Your Domain Name

What if your old host registered your domain for you (never a good idea, by the way) and you don't have the login information to change your DNS server to the new host?

Hopefully, when they registered your domain name, they did so in your name and listed you as the registrant in the whois database. If that is the case, then the easiest solution is to visit any domain name registration company other than the one you were previously registered with, and transfer your domain registration there. Since they want new customers, they will be happy to do that for you.

If your domain is not registered in your name— if it is registered in the name of your old host— you may, unfortunately, have to take legal steps to resolve the situation. I am not a lawyer and cannot give legal advice.

You may find that a brief letter from a real lawyer is sufficient motivation to convince your old host that pretending to own your domain name can only lead to expensive trouble.

Legal Note: yes, you may use sample HTML, Javascript, PHP and other code presented above in your own projects. You may not reproduce large portions of the text of the article without our express permission.

Got a LiveJournal account? Keep up with the latest articles in this FAQ by adding our syndicated feed to your friends list!