Installing Drupal

Last updated: January 12, 2023
Audience: All UW


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.


  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.


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

  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 any 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 (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: (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, then you will use 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. If planning a large site – The default mysql configuration may be insufficient to run a resource-intensive application.  Modify the following resource specifications if they are available in your original ‘.my.cnf ‘configuration file, or add them to the configuration file (because some are not present by default).  Important: Remember to keep backup files before you do anything! You will also have to reload the MySQL service after making changes to these configuration files.

    Open the configuration file:

    pico ~/.my.cnf

    Add the following lines to the bottom of the section labeled [mysqld] :

    key_buffer = 384M
    max_allowed_packet = 64M
    table_open_cache = 4096
    sort_buffer_size = 2M
    read_buffer_size = 2M
    read_rnd_buffer_size = 64M
    myisam_sort_buffer_size = 64M
    thread_cache_size = 8
    query_cache_size = 32M

    For info on restarting MySQL, see Basic MySQL Administration

  16. Special Note: Recent Drupal versions may create an .htaccess file in drupal/sites/default/files that contains “options” directives. If you have problems viewing themes or trying to view uploaded files, try to resolve by commenting out the “Options” lines in the .htaccess file in drupal/sites/default/files.  You will need to use the chmod command to give yourself write access to the file, and be sure to turn that access off when you are finished.

    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).

    Also Note: If you don’t have issues, you can skip this step.

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

Other Useful Drupal Resources