How To Transfer Your Site From One Web Host To Another?
By Brian Shoemaker
So, you have decided to switch web hosts. It is recommended you start the process at least a few days before the time runs out on the account with your present host. This will keep your website from experiencing any downtime between the move.
The first thing to do , after you have searched and found a new web host, is create a backup of your website . Make a new folder somewhere on your computer. Using your favorite FTP program, such as WS_FTP or Cute FTP (these and other FTP programs can be obtained at download.com), download all the files and folders on your website to the new folder you just made on your computer while maintaining the same folder and file structure (this will be important when uploading your files and folders onto your new host's server later). Make a note of any special chmod permissions you have set on any file or folder (look in your FTP program's help documents for information on checking a folder or file's chmod permissions). You will need to reset the permissions after you upload your files and folders to your new web host's server.
If you have any scripts or programs that you made a database for, make a backup of each database . If you have a database other than MySQL, check with your present web host for instructions on backing up your database. If you don't have any databases, you can skip these instructions. If your web host offers phpMyAdmin, log in to your control panel and go to the database section. Look for a link to phpMyAdmin and click on it. If required, log in using the username and password you gave for your database. If you assigned a different username and password for each database, you will have to repeat this process for each database. After you log in, click on "databases" and then click on the database you want to backup/export. Click "Export" on the top menu.
If you are using phpMyAdmin 2.4.0, highlight all the tables under "View dump (schema) of database." Make sure the "Structure and data" radio button is selected. Check "Save as file" and select either "zipped" or "gzipped." Click "Go" and save the file (it would be a good idea to create a new folder in which to save all your databases).
If you are using phpMyAdmin 2.6.0-pl1, highlight all the tables under "Export." Check the "Structure" and "Data" boxes and select "SQL" under the tables you highlighted. Check "Save as file" and under "Compression" select either "zipped" or "gzipped." Click "Go" and save the file. (it would be a good idea to create a new folder in which to save all your databases). If you don't have phpMyAdmin, you can backup your database using mysqldump.
Next, setup your databases.
If you have MySQL databases, log in to your control panel. Go to the database section and create databases. Also, assign usernames and passwords for the databases (if you have a database other than MySQL, check with your new web host for instructions on creating and importing databases). Now, find the link to phpMyAdmin. If required, log in using the usernames and passwords you just created. If you assigned a different username and password for each database, you will have to repeat this process for each database. After logging in, click on "databases" and select a database by clicking on it. From the top menu, click "SQL."
Go to the folder you saved your databases in and select the database that corresponds to the one you have open in phpMyAdmin. Open the file and copy and paste the database in the large text area in phpMyAdmin. Click "Go" under the text area field. You can also use the browse button to find the file on your computer and click "Go" below the browse field. If you don't see any errors, with whichever method you chose, you have just successfully imported the database. If you have more than one database, go back and repeat this process for each one, starting with logging in with your database username and password. If you don't have phpMyAdmin, you can use this method to create your databases.
You may need to edit some files before uploading them in the next step, by changing MySQL database name, username and password settings within the files, if any information has changed. If you don't remember which files contain MySQL settings, check the installation instructions for each script/program.
Next, upload the files from the folder in which you saved your website content onto the new web host's server, maintaining the same folder and file structure, using your FTP program. The only difference in structure may be the location of the cgi-bin. Some web hosts have your cgi-bin inside the www or public_html directory and some have it placed outside. If you had any programs or scripts on your website, you may need to edit some files by changing paths within them. If you don't remember which files contain paths that may need to be changed, check the installation instructions for each script/program. Also, change any file or folder permissions as needed (look in your FTP program's help documents for information on changing a folder or file's chmod permissions).
The final step is to point your domain name to your new web host's name servers. This information probably came in an email from your new web host soon after you registered with them. If not, send them an email asking them what the name servers are for your domain. Once you have this information, go to the website where you have your domain name registered. Log in to your account and set the name servers for your domain. Please note that changes to name servers may take as much as a couple of days to take effect. If you still have a few days left on your old account, your website shouldn't experience any downtime. Once the name servers change has taken effect, cancel the account with your old host (this is so you don't get charged for another term). That's it. You have successfully switched web hosts.
About the Author
Find affordable web hosting at Find-A-Web-Host.com.
Changing to a New Web Host
One of the biggest pains about having a web site is changing web hosts. I ought to know, I've changed over half a dozen times in the last three years. Each time has been a step up and with each move it becomes easier and easier to change.
Why change web hosts?
In many cases, your web site is the first and only thing that your customer sees (besides, hopefully, your product after they make a purchase). This is especially true if your company does not have a real-world presence such as a store or office. Thus it is important that your web site be available to your visitors (and customers if your site is commercial) twenty-four hours a day, seven days a week, 365 days a year.
Not only must it be available, but your web site must load quickly. If your host computer is too slow, it doesn't matter how much you optimize your graphics and HTML, cut down page sizes and perform other actions.
Other features must work properly. These include CGI routines, autoresponders, PHP, ASP and SSI scripts, and, very importantly, shopping carts and credit card services.
All of this is so important that you must keep an eye on your site. I use two services: alertsite and internetseer. Both of these ping my site occasionally to determine if it is up. Any errors are reported to my email inbox. Why do I do this? Two reasons: (a) it's critical that my site be online all of the time, and (b) these services provide a third-party record of any downtime, which is useful when attempting to get fees refunded.
These two services also measure response time, which is very useful to determine how well your site responds to your users browsing requests. These two factors, uptime and response time, are the most critical measures of web site performance. A consistently bad number in either measure is more than enough reason to find another host.
Of course, if your CGI routines stop working mysteriously or your autoresponders stop responding, then by all means shoot off a trouble ticket to your host. You have a right to expect these types of issues to be quickly and politely fixed. If they are not and the errors continue, then consider moving to another host.
Getting Ready to Move
There are a number of tasks that you should be performing on a regular basis. You see, you cannot predict when you might have to change web hosts. It could be that they are suddenly sold and their level of service drops, or they upgrade their computers which causes a series of new problems. You can be sure that you will only find out about these things when your web site stops working or becomes unstable.
Another reason to be performing regular maintenance tasks is the possibility of disasters. A hacker could deface or even destroy your web site. Your credit card could be closed, which might cause your host to close down your site until you pay. Any number of other disasters could occur, which make it very imperative that you have a continual set of procedures in place to be prepared for anything.
What do you need to do regularly?
Monitor your site - As I stated earlier, be sure you use a site monitoring service to keep an eye on your web site. That way you will know immediately if something happens.
Backup your site - You should perform all edits to your pages on your own computer and upload them to your site. Never edit your site pages directly. This, by it's very nature, ensures that a copy of your site always exists on your own computer system.
However, you may also have databases stored on your web site which do not originate from your computer. These might include mailing lists, demographic data, links and other similar things. These items must all be copied to your own hard drive on a regular basis.
You can set up your favorite FTP program to do scheduled downloads of selected databases, or you can just manually copy them on a regular basis.
In addition, your web host should be backing your site up daily. In many instances, these backups are available to your as downloadable zip files. Be sure and copy these down to your system once in a while - perhaps once a week.
Don't forget about such things as autoresponders, CGI routines and anything else which you may enter at your site control panel. You must ensure that you have a backup of everything.
Keep a log - Be sure you know everything that you've done to your site. You should list all of your autoresponders and their names, track any subdomains which you have set up, and anything else which you may do. This way if you have to change you can recreate your site quickly and efficiently.
Only use a domain name - Always reference your site via a domain name which you have purchased and control. Never, ever use the URL provided by your web host, as tempting as this can be at times. I ran into a situation where my web host URL was somehow entered into a number of search engines, and I discovered I was getting tens of thousands of hits from these URLs. This forced me to keep paying for the old site after I switched hosts, just to be able to redirect the traffic to my new site.
Make sure you register your domain elsewhere - The first time I registered a domain name, it seemed so convenient to just use my web hosts domain registration service. What I didn't know is they became the registrar, and it was a nightmare getting the domain transferred to a different one. By registering the domain at a different company, you will most likely get a better price, and you will gain independence from your web host.
Scope out a few hosts in advance - Even if you are completely happy with your current web host, at least take a few minutes and have a few names ready just in case. This way if you are forced to move, you have a pretty good idea of where.
Moving To A Different Host
If you are lucky, you get to make the choice about moving. In that case, you can simply upload your new site, get it all working, then transfer the domain and cancel the old site. This gives you a large amount of control, because you don't have to transfer the domain and cancel until you are happy with the new host.
If for some reason your web host has cut off access to your site, then you have to move fast. This is where the monitoring services come in handy - you know immediately when your site fails.
These are the steps that I follow when I change hosts.
1) Determine that a change is necessary. Ideally you are the one making this determination. Of course, if your web host decides for you, then you have to perform the rest of these steps very quickly because you are down.
2) Find a new hosting company. Read all of the information on the internet that I can find. I also learned something the hard way - check the hosting companies own forums for customer complaints. There were several times that I would have avoided trouble had I followed this advice.
3) Review the features of the hosting company to be sure they offer what you need. If you have any questions, be sure and send an email off to their sales department.
4) If you need a storefront, shopping cart and/or merchant status, be sure you resolve any issues you may have before laying out any money.
5) Sign up for the hosting company with the right size package, but the minimum amount of time (one to three months). This gives you some time to check them out without laying out too much money up front.
6) Once the site is active, start uploading files.
7) Modify any scripts as necessary. Test all of them to be sure they work.
8) Upload any autoresponders and set up your email forwarding as desired.
9) Create any subdomains, if you use this feature.
10) Of course, set up any databases. If your other site is still active, then just load the databases on the new site with data from the most recent backup - you just want the data for testing purposes. If it's not active, then load the databases with the most recent values you have.
11) Set up your storefront, merchant services and credit card processing, if necessary. Test as thoroughly as you can.
12) Once everything works and is tested, transfer the domain to the new host.
13) If you have the option, freeze your databases on the old site about 12 hours after transferring the domain. Disable all activity to the old databases, then copy to the new site.
14) Once the domain transfers (usually a day or two) test thoroughly again. Unfreeze the databases as soon as you can.
15) Once everything works, cancel the old account.
16) Depending upon the circumstances of the move, demand a partial or full refund. It does not matter what the hosting companies policies are - presumably you moved because they were not fulfilling their contract. This means they are in breach of contract, so demand your money back.
17) If they will not give it back (and they probably won't), check with your credit card company to see what your options are - if you've paid within 60 days via credit card, you may be able to get the credit card company to get your money back for you. This is where your monitoring logs come in very handy (assuming downtime or response time was the reason you left) - you can prove your case using third party data.
18) Why the focus on getting a refund? Because the hosting company did not provide contracted services - and no one should be rewarded for failure to fulfill their contract. The only real weapon you have is your money. Demand a refund.
19) Once you've moved, be sure and practice the maintenance steps mentioned earlier in this article. You may have to move your site again, and you want to be prepared.
So basically, moving to a new host is always a traumatic, time consuming event. You should take pains to be prepared so that the trauma is reduced in duration and loss.
|