1. Knowledge Base
  2. >
  3. Results
  4. >
  5. How to Move a Drupal Site from One Host to Another

How to Move a Drupal Site from One Host to Another

Here are the detailed steps how to successfully move a complete Drupal installation from one host to another. You can also check this article: How To Install Drupal with Softaculous to create a new Drupal installation.

Migrating Drupal On Your OLD Host:

  1. 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.
     
  2. 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".

This is your MySQL database.

On Your NEW Host:

  1. Upload your folder with the complete Drupal installation to your home directory.
     
  2. 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, e.g., "name_drpl1" as database name and "name_username" as database username.  
  3. Import (upload) the database (which you exported from the old host earlier) with phpMyAdmin to the new database. This might take a minute.
     
  4. 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.
     
  5. Chmod your "files" folder, so it is writable using your FTP client (Filezilla); chmod to 755.
     
  6. Check your .htaccess and [Drupal home] /sites/default/settings.php and make changes in case they are needed.

You can also check the followings article to learn more about:

Need additional assistance? HostGator's Support is here to help. Please contact us via phone or Live Chat so we can assist!