Last updated August 8, 2019


Goal

Download and install a theme from Drupal.org.

Site prerequisites

If you want to install via the website, the core Update Manager module must be installed. See Section 4.3, “Installing a Module” for instructions on installing modules.

If you want to use Drush, Drush must be installed. See Section 3.2, “Concept: Additional Tools”.

Steps

Downloading and Installing a Theme from Drupal.org

You can use the administrative interface to download and install a contributed theme. If you are installing a custom theme rather than a contributed theme, if you see a message saying Installing modules and themes requires FTP access to your server, or if the steps below do not work to download and unpack the theme files, follow the steps in Section 11.6, “Manually Downloading Module or Theme Files”. If you are using Composer to manage the files in your site, follow the steps for downloading in Section 3.5, “Using Composer to Download and Update Files”. In either of these cases, you can then install the theme using Drush, or by continuing with step 7 in the instructions for the administrative interface below.

Using the administrative interface

  1. On the theme’s project page on drupal.org (for example, https://www.drupal.org/project/mayo), scroll to the Downloads section at the bottom of the page.
  2. Right-click tar.gz to copy the address.

    Finding the URL for a theme

  3. In the Manage administrative menu, navigate to Appearance (admin/appearance). The Appearance page appears.
  4. Click Install new theme. The Install new theme page appears.

    Installing a theme

  5. In the field Install from a URL, paste the copied download link. This value could look like https://ftp.drupal.org/files/projects/mayo-8.x-1.3.tar.gz.
  6. Click Install to upload and unpack the new theme on the server. The files are being downloaded to the themes directory.
  7. Click Install newly added themes to return to the Appearance page. If you used the manual uploading procedure mentioned earlier, then you can continue with this step, and reach the Appearance page by using the Manage administrative menu and navigating to Appearance (admin/appearance).
  8. Locate the new theme under Uninstalled themes and click Install and set as default to use it. All non-administrative pages on the site will now use this new theme.

    Uninstalled themes on Appearance page

Using Drush to install a theme

  1. Find the project name for the theme you want to install, which is the last segment of the theme’s project page URL. For example, if the project URL is https://www.drupal.org/project/mayo, the project name is mayo.
  2. Download the theme using either the steps in Section 11.6, “Manually Downloading Module or Theme Files” or Section 3.5, “Using Composer to Download and Update Files”.
  3. Run the following Drush commands, giving the project name (for example, mayo) as a parameter:

    drush en mayo drush config-set system.theme default mayo
  4. Follow the instructions on the screen.

Expand your understanding