Site Building

11.5. Downloading and Installing a Theme from Drupal.org for Drupal 8, 9, and 10

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

Sprout Video

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/honey), scroll to the Downloads section at the bottom of the page.
  2. Right-click tar.gz to copy the address.

    Image
    Finding the URL for a theme

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

    Image
    Adding a theme

  5. In the field Add from a URL, paste the copied download link. This value could look like https://ftp.drupal.org/files/projects/honey-1.0.1.tar.gz.
  6. Click _ 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.

    Image
    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/honey, the project name is honey.
  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, honey) as a parameter:

    drush theme:enable honey
    drush config:set system.theme default honey
  4. Follow the instructions on the screen.

Expand your understanding