It is recommended to start the process at least a few days before the time runs out on the account with the present host if one has decided to switch his web hosts. This way website will not have to experience any downtime between the moves.
Firstly one has to create a backup of ones website after one has searched and found a new web hosting provider. A new folder should be made anywhere on the computer. download all the files and folders on the website to the new folder one has just made on ones computer while maintaining the same folder and file structure (this will be important when uploading ones files and folders onto ones new host’s server later) by using ones favorite FTP program, such as WS_FTP or Cute FTP (these and other FTP programs can be obtained at download.com). Note of any special chmod permissions one have set on any file or folder (look in the FTP program’s help documents for information on checking a folder or file’s chmod permissions) should be made. After uploading files and folders to ones new web host’s server. One will need to reset the permissions.
Make a backup of each database if one has any scripts or programs that one has made a database for. Check with ones present web host for instructions on backing up ones database if one have a database other than MySQL. One can skip these instructions if one doesn’t have any databases. Log in to ones control panel and go to the database section if ones web host offers phpMyAdmin. Look for a link to phpMyAdmin and click on it. Log in using the username and password one gave for ones database if required. One will have to repeat this process for each database if one has assigned a different username and password for every database. Click on “databases” and then click on the database one want to backup/export once one has logged in. On the top of the menu -Click “Export”.
Highlight all the tables under “View dump (schema) of database�, if one is using phpMyAdmin 2.4.0. “Structure and data” radio button is selected make sure. Check “Save as file” and select either “zipped” or “gzipped.” Click “Go” and save the file (create a new folder to save all ones databases).
Highlight all the tables under “Export�, if one is using phpMyAdmin 2.6.0-pl1. Select “SQL” under the tables highlighted and check the “Structure” and “Data” boxes. Check “Save as file” and under “Compression” opt for either “zipped” or “gzipped.” Click “Go” and save the file. (Creating a new folder to save all the databases would definitely be a good idea.) One can backup ones database using mysqldump. If one doesn’t have phpMyAdmin.
Secondly: -setting up of database.
On should Log on to control panel if he is having MySQL databases. Create databases by going to the database section. Usernames and passwords should be assigned for the databases (if one is having a database other than MySQL, check with one’s new web host for instructions on creating and importing databases). At this instant, find the link to phpMyAdmin. Log in using the usernames and passwords just created, if need be. One will have to repeat this process for each database if one has assigned a different username and password for each database. One should click on “databases” after logging in and select a database by clicking on it. Click “SQL.”, from the top menu.
Select the database that corresponds to opening in phpMyAdmin by going to the folder one have saved one’s databases in. copy and paste the database in the large text area in phpMyAdmin by Opening the file. Under the text area field, click “Go”. To find the file on one’s computer one can as well use the browse button and click “Go” below the browse field. One has successfully imported the database if one doesn’t see any errors, with whichever method one has chosen. If one is having more than one database, one should revert and repeat this process for each one, initially logging in with one’s database username and password.
By changing MySQL database name, username and password settings within the files one may need to edit some files before uploading them in the next step, if any information has changed. Check the installation instructions for each script/program if one doesn’t remember which files contain MySQL settings.
Thirdly, maintaining the same folder and file structure, using one’s FTP program, upload the files from the folder in which one has saved one’s website content onto the new web host’s server. The location of the cgi-bin may be the only difference in structure. Some web hosts have ones cgi-bin placed inside the www or public_html directory whereas few others have it placed outside. One may need to edit some files by changing paths within them if one had any programs or scripts on ones website. Check the installation instructions for each script/program if one does not remember which files contain paths that may need to be changed. Furthermore, change any file or folder permissions as required (for information on changing a folder or file’s chmod permissions one should look in one’s FTP program’s help documents).
Pointing one’s domain name to one’s new web hosting provider’s name servers is the final step. Soon after one gets registered with web host information comes in an email from the new web host. If the mail is not received then one should send them an email asking them what the name servers are for his domain., go to the website where one have his/her domain name registered. After having this information one should set the name servers for one’s domain by Logging to ones account. Please see to it that changes to name servers may take as much as a couple of days to take effect, in the meanwhile website shouldn’t experience any downtime if one still have a few days left on his/her old account. Cancel the account with old host once the name server’s change has taken effect. This way one can successfully switch web hosts.