1. bluehost knowledge base

Drupal: Drupal Gardens

Drupal is an open-source content management platform powering millions of websites and applications. It’s built, used, and supported by an active and diverse community of people around the world. This article explains how to transfer your Drupal website from Drupal Gardens to Bluehost. Please note, this service is no longer offered by Drupal. For more information, please utilize Drupal's Help Resources.

Tasks Involved:

Export Your Site From Drupal Gardens

The first step to move your site is to get a copy of all your site database and files. You can obtain these by exporting your site from Drupal Gardens.

  1. Log in to your account at Drupal Gardens.
  2. Go to My Sites.
  3. Click on the Actions menu next to the site you want to export.
  4. Select Export site.
  5. Take note of the warning about your login credentials changing. This will be important later.
  6. Choose "Want to host it on a 3rd party hosting company" as the reason for exporting.
  7. Enter an explanation for exporting.
  8. Click Export
    Note: The Export can take some time depending on the size of your site.
  9. When prompted, save the export file to your computer.

Do not delete any of the files you have exported. It's a good idea to keep them as a backup if there is an error during the transfer of your site to Bluehost.
 

Extract and Upload Files

The file exported from Drupal Gardens will be a .tar.gz archive file. You will need to extract the file and upload some of its contents to your Bluehost account. This process will vary depending on your computer.

If your computer doesn't have the built-in ability to extract a .tar.gz file, you can try using 7-zip.

Note: There are a few files in the export that should never be uploaded to your Bluehost account for security reasons.

  • credentials-*.txt This file contains the username and password for your site in plain text. Uploading it may make your password visible to anyone.
    Note: Your credentials-*.txt will be named according to your Drupal Gardens' username and the site's name.
  • *.sql This file contains the database that holds all your content, configuration settings, and user information.
    Note: Your *.sql file will be named according to your Drupal Gardens' site name. It will be imported into a database in another step but should not be uploaded with the rest of the website.
  1. Go to the location on your computer where you saved the export file, and extract the file.
    Once extracted, you will have a folder called docroot that contains all the files needed to move your site.
  2. Open your preferred FTP program and connect to your Bluehost account. Note: For help with FTP, please see Intro to FTP.
  3. Navigate to the location you will host your site.
    Note: This can be your public_html folder or a directory inside it.
  4. Upload all files inside the docroot folder except the *.sql and the credentials-*.txt fileNote: Your credentials-*.txt and *.sql file will be named according to your Drupal Gardens' username and the site's name.
 

Setup The Database

Drupal uses a database to keep track of all the content, settings, and user information. In this section, we will recreate that database.

Creating a Database

  1. Inside your Bluehost control panel, go to Hosting.
  2. Next, select Databases and scroll to the Create A New Database form.
  3. Scroll to the "Create A New Database" form.
  4. Enter the name of the database you would like your Drupal site to use.
  5. Click Create Database.

Create a User

  1. On the Database page, scroll to the Add a New User form.
  2. Enter a username for your new database.
    Note: All usernames are prefixed with your cPanel username and will look something like examplec_nameyouchose.
  3. Create a password for the username.
  4. Click Create a User.

Add the User to the Database

  1. On the database page, scroll to the "Add a User to a Database" form.
  2. Select the new user from the User dropdown.
  3. Select the new database from the Database dropdown.
  4. Click Add.
  5. On the next page, select ALL PRIVILEGES at the top of the privilege table.
  6. Click the Make Changes button.

The next step is to import all the information into the database.
 

Import Data

Now that you've created a new database, you need to copy the information from your old database into the new one.

  1. Go to the Hosting section of your Bluehost control panel.
  2. Scroll down to the Database Tools.
  3. Click on the phpMyAdmin icon.
  4. Log in to phpMyAdmin with your cPanel username and password.
    Note: If you have changed your MySQL primary password, use that password instead.
  5. Select the new database you created from the list on the left side.
  6. Click on the Import tab.
  7. On the import page, choose the Browse your computer option.
  8. Select the .sql file in the files you exported and extracted from Drupal Gardens earlier.
  9. Once you've selected the file, click Go.

Wait for the import to finish. Once it's done, you can move on to Modify The Database Connection Settings.
 

Modify Database Connection Settings

  1. In your Bluehost control panel, go to Hosting, then click on cPanel.
  2. Scroll down to the files section.
  3. Click on the File Manager icon.
  4. Navigate to the directory you uploaded your Drupal files to.
  5. Go to the sites/default/ folder.
  6. Right-click on the settings.php file and select Code Editor.
    Note: If you get a message about character encoding, click edit to continue opening the file.
  7. Scroll down to around line number 221 and enter the new database name, username, and password.
  8. Click Save in the top right corner.

Note: If you are using a temporary URL like http://74.220.219.65/~example/ for your site instead of the domain name, you will need to make one more change to your settings.php file.

  1. You will need to set the base URL value in your settings.php file to use the temporary URL. Find the line in the file that says:
    $base_url = 'http://www.example.com'; // NO trailing slash!
  2. If the line starts with a # then remove just that character.
  3. Change the URL in the code to the temporary URL you plan to use for the site. Do not include a trailing slash.
    For example, if the temporary URL of your site is http://74.220.219.65/~example/ then the line would read:
    $base_url = 'http://74.220.219.65/~example'; // NO trailing slash!
  4. Click the Save button in the top right corner to save the changes.
 

Modify .htaccess File

The .htaccess file that was exported with your site will cause a server error to appear. To resolve this, the .htaccess file needs to be modified.

  1. In the file manager, navigate to the directory you uploaded your Drupal files to.
  2. Right click on the .htaccess file and select Code Editor.
  3. Delete the lines of code that say: 
    #Follow symbolic links in this directory. Options +FollowSymLinks 
    Note: This code is usually on line 13 and 14.
  4. Click the Save button in the top right corner.

Note: If you are using a temporary URL like http://74.220.219.65/~example/ for your site instead of the domain name, you will need to make two additional changes to the code in your .htaccess file.

  1. Since temporary URLs have a directory in the name, like http://74.220.219.65/~example/ we will need to add a rule in the .htaccess file to accommodate the folder. If your temporary URL was http://74.220.219.65/~example/ , for example, then you would add:
    RewriteBase /~example 
    to the .htaccess file. Do not add a forward slash at the end of the rule.
  2. Next, you'll need to add a # before the line that reads: Header always set X-Content-Type-Options nosniff so the server will ignore that line of code. This is done so that the server will allow the site to be loaded from a URL other than the domain name. If you change the site to use the domain name, later on, you will want to remove the 
  3. Click the save button in the top right corner to save the changes.

That's all for modifying the .htaccess file. You can close your File Manager. Your site will now be functioning on your Bluehost account.
 

Log In With The New Password

The login credentials used for your site will have changed from what you used at Drupal Gardens. To log in, you will need to use the new username and password that was stored in your site's credentials-*.txt file.
 

Drupal Help Resources

The Drupal community provides vast documentation and support via their website, Drupal.org. There are also thousands of independent sites that provide information, modules, themes, tips, tricks, hacks, and you name it.

Here are some suggested resources for Drupal:
 

Drupal.org

The Drupal script's official website, with comprehensive documentation and support forums to ask questions and find answers. When you are having issues with Drupal, this should be your first stop for support since common issues, and their solutions are frequently posted on this site. There is also a great community of active users to whom you can pose your questions.

Module or Theme Designer's Official Website

As you work with Drupal, you may wish to add modules and themes to your website. When you are experiencing an issue with a particular module or theme, it is generally best to contact the module's creator or theme. You can locate this information on Drupal.org under the "Download & Extend" menu or by performing a search.