Site Building

11.3. Downloading and Installing a Module from Drupal.org for Drupal 8, 9, and 10

Goal

Download and install the contributed Admin Toolbar module, which allows you to easily browse through the administration section of the website.

Site prerequisites

Steps

Sprout Video

You can use the administrative interface to download and install a contributed module. If you are installing a custom module rather than a contributed module, 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 module 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 module using Drush, or by continuing with step 7 in the instructions for the administrative interface below.

Using the administrative interface

  1. On the Admin toolbar project page on drupal.org (https://www.drupal.org/project/admin_toolbar), scroll to the Downloads section at the bottom of the page.
  2. Copy the address of the tar.gz link. Depending on your device and browser, you might do this by right clicking and selecting Copy link address.

    Image
    Finding a module URL

  3. In the Manage administrative menu, navigate to Extend (admin/modules). The Extend page appears.
  4. Click Add new module. The Add new module page appears.

    Image
    Add a module from a URL

  5. In the field Add from a URL, paste the copied download link. This value could look like this: https://ftp.drupal.org/files/projects/admin_toolbar-8.x-2.4.tar.gz
  6. Click Continue to upload and unpack the new module on the server. The files are being downloaded to the modules directory.
  7. Click Enable newly added modules to return to the Extend page. If you used the manual uploading procedure mentioned earlier, then you can continue with this step, and reach the Extend page by using the Manage administrative menu and navigating to Extend (admin/modules).
  8. Locate the Admin toolbar module and check it.
  9. Click Install to turn on the new module.

Using Drush to install a module

  1. Find the project name for the module you want to install, which is the last segment of the module’s project page URL. For example, if the project URL is https://www.drupal.org/project/admin_toolbar, the project name is "admin_toolbar".
  2. Download the module 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 command, giving the project name (for example, admin_toolbar) as a parameter:

    drush pm:enable admin_toolbar
  4. Follow the instructions on the screen.

Expand your understanding