This tutorial is aimed at beginning webmasters that want to switch web hosts because of frequent website downtime or slow loading pages that can affect search engine optimization. If your site is buggy and you are concerned it will affect your SEO, you do not want to miss this great article!
There comes a time when you decide to switch web hosts. The primary reason is that either the web host is slow, buggy, costly, or has limited features for your website. You might also decide to transfer to another web host located in your targeted country to get the benefits of geo-targeting in Google (see my on geo-targeting and SEO for more information).
The examples used in this tutorial are for websites requiring a LAMPP environment (Linux, Apache, MySQL and PHP), though the concept of transferring processes can be applied to any hosting server configuration.
Step 1.) Download All Important Files in your Existing Server
The first thing that you should do is to download all important files in your existing server. These files are the following:
a.) Template files (e.g. those with .php, .aspx, .asp, jsp) needed for normal operation of your website. b.) HTML, Javascript, CSS and other files needed to render the website properly. c.) .htaccess files or web.config d.) images e.) important documents.
If you do normal cleaning in your hosting server, then all of the files in it are important, so you will want to download all of them. Using an SSH (recommended for better security) or FTP client, you need to select all files (press Control-A) right click on them, and start downloading.
Step 2.) Download All Important Databases
If you have a dynamic website (a website that uses databases such as MySQL, MS-SQL, etc); then you also need to download it to your local computer. Since most websites use MySQL databases in Apache/Linux/PHP web environment; let’s use phpMyAdmin to download it:
1.) Log-in to your hosting control panel and then go to the phpMyAdmin interface. 2.) In one of the phpMyAdmin menus, click “Export” link. 3.) Under “Export”, you will see the list of your MySQL database. If you have more than one MySQL database, it is recommended that you download them one by one. Select one database first, and then make sure “SQL” is selected. Leave the rest of the settings as default. 4.) Ensure the “Save as file” is checked. Then click “Go” to download the database. You can find the correct settings used to download MySQL database here using phpMyAdmin: http://www.php-developer.org/screenshot/downloadingdatabase.jpg
5.) Once downloaded, the file name of the SQL file will be changed, for example it will named something like localhost.sql. This is ok.
6.) If you need to download another MySQL database, repeat procedure 2 to 5 above.
Step 3.) Test your Backup Files and MySQL database in Local host
This step is optional but highly recommended if you need to ensure that you have correctly downloaded all files and the required databases. Sometimes, when you are downloading files, you might forget to download important files such as images, etc in some parts of your server. As a result if you do not check your backups, your website will not work properly in the new web host. Below are the recommended steps to test your backups:
1.) Install XAMPP to your computer. This is a local Apache web server with MySQL and PHP which act as a local web host in testing your backups.
2.) Transfer all your files to the htdocs directory. If you are using CMS such as Wordpress or Joomla, you need to install it first then transfer your theme files to it. For Wordpress users, you can read this tutorial: http://www.aspfree.com/c/a/BrainDump/Install-and-Run-WordPress-in-XAMPP-Local-Host/
3.) Import your MySQL database to XAMPP phpMyAdmin. To import the database:
a.) Missing images. b.) Distorted pages c.) Functionality/missing features
Make sure that your website appears as complete as possible. If something is wrong, some files might not be downloaded properly in Step1. Compare the files you have downloaded with the one in your existing remote server.