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.
- Export Your Site From Drupal Gardens
- Extract and Upload Files
- Set Up Database
- Import Data
- Modify Database Connection Settings
- Modify .htaccess File
- Log In With New Password
- Additional Help
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.
- Log in to your account at Drupal Gardens.
- Go to My Sites.
- Click on the Actions menu next to the site you want to export.
- Select Export site.
- Take note of the warning about your login credentials changing. This will be important later.
- Choose "Want to host it on a 3rd party hosting company" as the reason for exporting.
- Enter an explanation for exporting.
- Click Export
Note: The Export can take some time depending on the size of your site.
- 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.
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.
- 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.
- Open your preferred FTP program and connect to your Bluehost account. Note: For help with FTP, please see Intro to FTP.
- Navigate to the location you will host your site.
Note: This can be your public_html folder or a directory inside it.
- Upload all files inside the docroot folder except the *.sql and the credentials-*.txt file. Note: Your credentials-*.txt and *.sql file will be named according to your Drupal Gardens' username and the site's name.
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
- Inside your Bluehost control panel, go to Hosting.
- Next, select Databases and scroll to the Create A New Database form.
- Scroll to the "Create A New Database" form.
- Enter the name of the database you would like your Drupal site to use.
- Click Create Database.
Create a User
- On the Database page, scroll to the Add a New User form.
- Enter a username for your new database.
Note: All usernames are prefixed with your cPanel username and will look something like examplec_nameyouchose.
- Create a password for the username.
- Click Create a User.
Add the User to the Database
- On the database page, scroll to the "Add a User to a Database" form.
- Select the new user from the User dropdown.
- Select the new database from the Database dropdown.
- Click Add.
- On the next page, select ALL PRIVILEGES at the top of the privilege table.
- Click the Make Changes button.
The next step is to import all the information into the database.
Now that you've created a new database, you need to copy the information from your old database into the new one.
- Go to the Hosting section of your Bluehost control panel.
- Scroll down to the Database Tools.
- Click on the phpMyAdmin icon.
- Log in to phpMyAdmin with your cPanel username and password.
Note: If you have changed your MySQL primary password, use that password instead.
- Select the new database you created from the list on the left side.
- Click on the Import tab.
- On the import page, choose the Browse your computer option.
- Select the .sql file in the files you exported and extracted from Drupal Gardens earlier.
- 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.
- In your Bluehost control panel, go to Hosting, then click on cPanel.
- Scroll down to the files section.
- Click on the File Manager icon.
- Navigate to the directory you uploaded your Drupal files to.
- Go to the sites/default/ folder.
- 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.
- Scroll down to around line number 221 and enter the new database name, username, and password.
- Click Save in the top right corner.
Note: If you are using a temporary URL like http://18.104.22.168/~example/ for your site instead of the domain name, you will need to make one more change to your settings.php file.
- 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!
- If the line starts with a # then remove just that character.
- 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://22.214.171.124/~example/ then the line would read:
$base_url = 'http://126.96.36.199/~example'; // NO trailing slash!
- Click the Save button in the top right corner to save the changes.
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.
- In the file manager, navigate to the directory you uploaded your Drupal files to.
- Right click on the .htaccess file and select Code Editor.
- 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.
- Click the Save button in the top right corner.
Note: If you are using a temporary URL like http://188.8.131.52/~example/ for your site instead of the domain name, you will need to make two additional changes to the code in your .htaccess file.
- Since temporary URLs have a directory in the name, like http://184.108.40.206/~example/ we will need to add a rule in the .htaccess file to accommodate the folder. If your temporary URL was
http://220.127.116.11/~example/, for example, then you would add:
to the .htaccess file. Do not add a forward slash at the end of the rule.
- Next, you'll need to add a
#before the line that reads:
Header always set X-Content-Type-Options nosniffso 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
- 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.
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.
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:
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.