After setting up Drupal on a test server, here is how we successfully (and a little frustratingly) we moved to our live domain which is hosted by Fasthosts. This explanation is an adaptation of this article.
Migrating Drupal on your OLD host:
- Backup your whole home directory from your ftp access using an ftp client like the free filezilla. Make a folder on your local harddisk and download the complete directory to that local folder.
- Backup your mysql database on your old host using the free phpadmin, select your mysql database, usually something like
name_drpl1. Select all fields, click "export" and save the database to your local harddisk. Leave default options enabled. You will receive a file similar to name_drpl1.sql.This is your mysql database.
On your NEW host:
- Upload your folder with the complete drupal installation to your home directory.
- Once done, go to phpadmin on the new host, create a new mysql database, example
name_drpl1 and create a new mysql user. Create a password for this new mysql user, click "assign all privileges" to this user and assign the user to the new database.
You now should have a new mysql database on the new host with a mysql user, eg. name_drpl1 as database name and name_username as database user name.
- Import (upload) the database (which you exported from the old host earlier) with phpadmin to the new database. This might take a minute.
- If needed edit the file [drupal home]/sites/default/settings.php and edit at the section where you enter the database, location, username and password. You can enter the password either encrypted or not encrypted there.
- Using Filezilla or similar FTP softaware Chmod your "files" folder as 777, so it is writeable.
- Double check your
.htaccess and [drupal home] /sites/default/settings.php and make changes in case they are needed.
Nameserver changes:
- Change nameserves on your domain host and let them point to your new host's nameservers.
- Enter the new nameservers in your control panel where your domain names are hosted, overwriting the old ones.
- After some time (sometimes a day or two) your domain should point to the new host and drupal should be up and running on the new host.
.htaccess file changes:
Replace the entire contents of the .htaccess file in Drupal's root directory on the new host with this code.
Fasthosts MySQL error message
For reasons we don't claim to understand, the following error message can be safely ignored...
Your PHP MySQL library version 4.1.11 differs from your MySQL server version 5.0.22. This may cause unpredictable behavior.
I hope that this helps others. Good luck!