After being with the same webhost for the last decade or so, I recently decided to move most of my sites to HostGator after being pleased with the service I experienced with my other sites I have hosted with HostGator, not to mention all of the great customer reviews from friends and people online they have going for them.

This post isn’t to heap praise or disparage anyone, though. I want to give you a quick and easy tutorial on how to switch Web hosts without the headache!how to switch hosts

The first step is to sign up with a new web host. Again I went to HostGator for all of the reasons mentioned but you can also refer to my web hosting comparison for more details on what differentiates the major players.

The next step only applies if you have a database which needs to be backed up. This applies to most of my sites as they are all WordPress run. Launch the PhpMyAdmin section of the site you’re transferring at your old web host and select the database over on the left column. When you click on the database it will show you all of the tables which make up that database. Ignore this and click on “export” and on the next page, click “select all” to ensure that all tables are selected.

Tick the SQL radio button and make sure the “add AUTO_INCREMENT value” button is ticketed as well as the “use hexadecimal for BLOB. Make sure that the export type is “insert” and go ahead at the bottom of the page and click “save as file”, name your file, and select “no” compression. Note that most of these options will already be ticked and set as default for you.

The next step applies to everyone. Download all of the files of your website (maintaining the folder hierarchy) to your computer from the FTP of your old host. Upload them to your new host via FTP in the exact same formation. You may have to compress the folder containing those files on your computer, upload that, then extract it in your new host’s FTP.

Getting back to those with databases, you have to create a new database on your new host. Choose a name for your new database and create a username and password for your user and connect that new user with the database, giving that user complete permissions for that database.

Now you can go into the PHPMyAdmin section of your new host, select that new database, and simply click on the “import” tab this time and locate your MySQL file for your site and upload it.

Now the last thing which everyone needs to do is to tell your website or more specifically the registrar you registered your site with that it’s hosted somewhere else. Your new host will give you your new nameservers, so simply log into your account where you registered the site, go to the domains section and select the domain in question, then find the nameservers section and select “set nameservers”. Specify that you have your own nameservers then just plug in the ones you got from your hosting company. You can find these in your welcome email after you purchase your new hosting account most easily or you can log on to your hosting account and find them there.

In the next 48 hours the site may load alternately between your old and new host but after the 48 hours it should be fine.

One final reminder to remember that if you are running WordPress on your site that you need to update your “wp-config” file to reflect the new database/username login information.