How to Move a Drupal Site from One Host to Another | HostGator Support
  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 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 installation.

Migrating Drupal

Do the following on your old Host:

  1. Back up 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. Back up 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.

Do the following on your new Host:

  1. Upload your folder with the complete Drupal installation to your home directory.
    To learn how to upload your files, please check out this article How to Upload a File Using the File Manager?.
  2. Once done, go to cPanel.
  3. Look for the Databases section, then click MySQL Databases.

    cPanel MySQL database

  4. On the MySQL Databases page, create a MySQL Database (example: name_drpl1) and MySQL User (example: name_username).
  5. Create a password for this new MySQL user.
  6. In assigning privileges, click ALL PRIVILEGES for the user, and assign the user to the new database.
    Please refer to the article, How To Create or Delete a MySQL Database or User, for creating a database and database user and assigning privileges.
  7. Import (upload) the database (which you exported from the old host earlier) with phpMyAdmin to the new database. 
  8. If needed, edit the file [Drupal home]/sites/default/settings.php in the section where you enter the database, location, username, and password. You can enter the password, either encrypted or not encrypted, there.
  9. Chmod your files folder so it is writable using your FTP client (Filezilla); chmod to 755.
  10. Check your .htaccess and [Drupal home] /sites/default/settings.php and make changes if 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 chat so we can assist!