Site Building

4.3. Installing a Module for Drupal 8, 9, 10, and 11

Goal

Install a core module, or a contributed module whose files have already been uploaded to the site, through the administrative interface or using Drush.

Prerequisite knowledge

Section 1.2, “Concept: Modules”

Site prerequisites

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

Steps

Sprout Video

You can use the administrative interface or Drush to install modules.

Using the administrative interface

  1. In the Manage administrative menu, navigate to Extend (admin/modules). The Extend page appears showing all the available modules in your site.
  2. Check the boxes for the module or modules you want to install. For example, check the box for the core Actions UI module.

    Image
    Enabling the core Actions UI module

  3. Click Install. The checked modules will be installed.

Using Drush

  1. In the Manage administrative menu, navigate to Extend (admin/modules). The Extend page appears showing all the available modules in your site.
  2. Find the machine name of the module you want to install, by expanding the information area for the module. For instance, the core Actions UI module’s machine name is action.
  3. Run the following Drush command to install the module:

    drush pm:enable action

Expand your understanding

If you do not see the effect of these changes in your site, you might need to clear the cache. See Section 12.2, “Clearing the Cache”.

Additional resources

Drush

Attributions

Written and edited by Boris Doesborg and Jennifer Hodgdon, and Joe Shindelar at Drupalize.Me.

Drupal User Guide