Site Building

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

Goal

Download and install a theme from Drupal.org.

Site prerequisites

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

Steps

Sprout Video

To install a contributed theme, first download the theme with Composer. Then install it using either the administrative interface or Drush. If you are installing a custom theme rather than a contributed theme that is not available via Composer, skip the steps for downloading the theme, and refer to Section 11.6, “Manually Installing Module or Theme Files”. Then return here and follow the steps for installing the theme using either the administrative interface or Drush.

Download the contributed theme with Composer

  1. On the theme’s project page on drupal.org (for example, https://www.drupal.org/project/honey), scroll to the Releases section at the bottom of the page.
  2. Copy the provided Composer command for the version of the theme you want to install.

    Image
    Finding the composer command for a theme

  3. Alternatively, type the following command (substituting the short name of the theme and desired version for honey:^1.0):

    composer require 'drupal/honey:^1.0'
  4. At the command line, change to the root directory or your project. Paste the Composer command and execute it.
  5. You should see a message about the theme being successfully downloaded.

Install the theme using the administrative interface

  1. In the Manage administrative menu, navigate to Appearance (admin/appearance). The Appearance page appears.
  2. 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

Install the theme using Drush

  1. To install the theme, and set it as the default, 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
  2. Follow the instructions on the screen.

Expand your understanding

Drupal User Guide