How to Move a Drupal Site from One Host to Another
Drupal Hosting and InstallationHere are the detailed steps how to successfully move a complete Drupal installation from one host to another. You can also watch our video on how to install Drupal if you want to create a new Drupal installation.
The documentation on drupal.org is not necessarily clear. Here are the exact steps how to move a complete site, including your Drupal mySQL database.
Migrating Drupal On Your OLD Host:
- Backup your whole home directory from your ftp access using an ftp client like Filezilla. Make a folder on your local hard disk and download the complete directory to that local folder.
- Backup your mySQL database on your old host using phpMyAdmin; select your mySQL database, usually something like "name_drpl1". Select all fields, click "export," and save the database to your local hard disk. Leave default options enabled. You will receive a file similar to "name_drpl1.sql".
On Your NEW Host:
- Upload your folder with the complete Drupal installation to your home-directory.
- Once done, go to cPanel -> MySQL 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 username.
- Import (upload) the database (which you exported from the old host earlier) with phpMyAdmin 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.
- Chmod your "files" folder so it is writable using your ftp client (Filezilla); chmod to 755.
- Double check your .htaccess and [Drupal home] /sites/default/settings.php and make changes in case they are needed.