Installing Drupal

Pre-Requisites

MySQL Server
Drupal requires a Database Management System, so if you don't already have it installed on your account, we recommend installing MySQL.

MySQL Database
You also need to create a database for Drupal. The name is not too important, but most users choose "drupal." Look at our instructions for creating a database using the MySQL command-line client or Drupal's database creation page.

Understand your Responsibilities and Keep Site Up to Date

Drupal is frequently updated. As a site owner, you are responsible for keeping your site up-to-date and properly upgraded. Old installs can result in unpatched security holes which can be exploited. In order to keep the servers secure, UW-IT may shut down compromised or potentially insecure sites without prior notification. If you have old versions of Drupal, please be sure to remove or secure them.

 

Installation

  1. Log into your web development server using a terminal emulator. If you're not sure how to do this, click here for instructions.

  2. Change directories to your public_html directory.

    cd ~/public_html

  3. Download Drupal using wget.

    wget http://ftp.drupal.org/files/projects/drupal-version.tar.gz

    Make sure to replace version with the actual version of Drupal you're trying to download, or just copy/paste the URL from drupal.org.

  4. Unzip the file you just downloaded:

    tar -xzvf drupal-version.tar.gz

  5. Rename the directory to something easier to remember, or perhaps something that pertains to what you're going to use Drupal for.

    mv drupal-version drupal

  6. By default Drupal has "options" configured in files. Our Web server configuration does not allow setting the "Options" directive, so an attempt to do so, like the "Options" lines in this .htaccessfile, will cause a server error. Here we will remove these "options" directives so your site functions normally.

    cd drupal

    pico .htaccess

    Comment out the three lines that begin with "Options" by adding a pound symbol (#) to the beginning of the line they are on. The "Options" lines should look like the ones below when you're done.

    # Don't show directory listings for URLs which map to a directory.
    #Options -Indexes

    # Follow symbolic links in this directory.
    #Options +FollowSymLinks

  7. Un-comment the 'RewriteBase" line by removing the pound symbol on that line. The "RewriteBase" line should look like the one below when you have uncommented it and added your UW NetID. Change the path as necessary. There may be two or more of these: you just need to uncomment out one. You must do this if you plan to use clean URLs.

    RewriteBase /your_uw_netid/drupal

    Save and close the file using Pico. (Click for instructions on how to use pico).

  8. Copy the configuration file template.

    cp sites/default/default.settings.php sites/default/settings.php

  9. Go to http://account_type.washington.edu/uwnetid/drupal/ (where account_type is the type of account you have and uwnetid is the UW NetID of the account you are installing Drupal on).

  10. Click on "Install Drupal in English."

    Click on "Advanced options" and fill out the Database configuration form as follows:

    Database type: mysql
    Database name: drupal (or whatever you named the database you created for Drupal)
    Database username: Use a username you have created in MySQL with access to the drupal database. If you didn't create a user, this will be root.
    Database password: The password for the database username above.
    Advanced options  
    Database host: server.u.washington.edu (see note below)
    Database port: The port number you used when you configured MySQL.

    The "Database host" field is the most confusing one here. If your website URL is at students.washington.edu, then you will use vergil.u.washington.edu. Otherwise, you will be most likely use your_netid.ovid.u.washington.eduFind out more about web hosts.

  11. Wait for the database structure to be written and then fill out the "Configure site" form. These options are up to you. If you do not enter a real email address, you will probably receive bounced email messages.

    Press the "Save and continue" button to submit the form.

  12. Click on the "your new site" link to start using Drupal.

  13. To speed up your site and keep the servers running smoothly, we recommend that you turn on caching.

    Click on "Configuration" and then "Performance." You will want to select the "Cache pages for anonymous users" checkbox. Caching will reduce the amount of times that our server needs to dynamically-generate content without impacting user experience. Depending on your specific uses and application, you may want to also select other caching options.

    During development you will most likely want to turn off this feature, but be sure to re-activate it before moving the site to production status.

  14. The default Drupal settings don't work with our system to allow Module and Theme uploads. To fix this, you will need log into your website, and then click "Configuration" and then "File Manager." Change the "Temporary Directory" from "/tmp" to "tmp" and then save. All you're doing is removing the forward slash.

  15. Drupal 7.4+ creates an .htaccess file in drupal/sites/default/files that contains "options" directives. After you upload a file for the first time, you may not be able to access it until you edit this file. If you see these issues, you will comment out the "Options" lines in the .htaccess file in drupal/sites/default/files as well.

    chmod +w sites/default/files/.htaccess
    pico sites/default/files/.htaccess
    chmod -w sites/default/files/.htaccess

    Save and close the file using Pico. (Click for instructions on how to use pico).

    Note: If you don't have issues accessing uploaded files, you can skip this step.

  16. You're done! Send an e-mail to help[at]uw.edu if you run into any server errors, installation issues, or other web publishing concerns.

Other Useful Drupal Resources

Last modified: April 20, 2014