We recommend starting the process at least a few days before your account expires on your current host. This will prevent your site from going down during the move.
After searching and finding a new web host, the first thing you should do is create a backup of your website. Create a new folder somewhere on your computer. Use your favorite FTP program such as WS_FTP or Cute FTP (these and other FTP programs are available at download.com) to transfer all the files and folders on your website to the new folder you just created on your computer. Download to a folder and keep the folder and files. Structure (this is important if you later upload files and folders to the new host's server). Make a note of any special CHMOD permissions you have set on the file or folder (consult your FTP program's help documentation to check the CHMOD permissions of a folder or file). After uploading your files and folders to your new web host's server, you'll need to reset permissions.
If you have scripts or programs that created databases, make a backup copy of each database. If you're using a database other than MySQL, check with your current web host for database backup instructions. If you don't have a database. If your web host offers phpMyAdmin, log into your control panel and go to the database section. Find and click the link to phpMyAdmin. If necessary, log in with the username and password you assigned to the database. If you assign different usernames and passwords to different databases, you must repeat this process for each database. After logging in, click Databases, then click the database you want to backup/export. Click "Export" on the top menu.
If you're using phpMyAdmin 2.4.0, check all the tables under View database dump (schema). Make sure the Structure and data radio button is selected. Check "Save as file" and select "ZIP" or "GZIP". Click Run to save the file(It is recommended to create a new folder to store all databases).
If you are using phpMyAdmin 2.6.0-pl1 check all tables under Export. Check the boxes for "Structure" and "Data" and select "SQL" under the highlighted table. Enable "Save as file" and select "zip" or "gzip" for "Compression". Click Run and save the file. (We recommend creating a new folder to store all databases). If you don't have phpMyAdmin, you can use MySQLdump to back up your database.
Next, set up your database.
If you have a MySQL database, log into your control panel. Go to the database section and create a database. Also, assign a database username and password (if using a database other than MySQL, check the instructions for creating and importing a database on your new web host). Then look for the link to phpMyAdmin. If necessary, log in using the username and password you created. If you assign different usernames and passwords to different databases, you must repeat this process for each database. After logging in, click Databases, then click a database to select it. Click "SQL" in the top
Navigate to the folder where you saved your database and select the database that matches the one you opened in phpMyAdmin. Open the file, copy the database and paste it into phpMyAdmin's large text area. Click Go below the text area box. You can also use the browse button to locate the file on your computer and click Go below the browse box. If none of the methods you choose show any errors, then your database has been successfully imported. If you have multiple databases, start by logging in with your database username and password, then go back and repeat the process for each database. If you don't have phpMyAdmin, you can use this method to create a database.
If the information has changed, you will need to edit some files before uploading the file in the next step by changing his MySQL database name, username, and password settings in the file There are cases. If you don't remember which file contains her MySQL settings, check the installation instructions for each script/program.
Then use an FTP program to upload the files from the folder where you saved your website content to the new web host's server, keeping the same folder and file structure. The only difference in structure is the location of cgi-bin. Some web hosts have cgi-bin in the www or public_html directory, while others have it located externally. If you had a program or script on your website, you may need to change the path and edit some files. Check the installation instructions for each script/program if you don't remember which file contains paths that may need to be changed. Also, change the file or folder permissions as needed (consult your FTP program's help documentation on changing CHMOD permissions for folders or files). The final step is to point your domain name to your new web host's nameservers. This information may have been emailed to you by your new web host shortly after you registered with it. If not, email them and ask about the nameservers for your domain. Once you have this information, go to the website where you registered your domain name. Sign in to your account and set the nameservers for your domain. It may take a few days for the nameserver change to take effect. If the old account remains for a few days, the site should not experience any downtime. Once your nameserver changes take effect, cancel your old host account (you won't be charged for subsequent periods). that's it. You have successfully switched web hosts.