Drupal 8 User Guide: 11.3. Downloading and Installing a Module from Drupal.org

Drupal 8 User Guide: 11.3. Downloading and Installing a Module from Drupal.org


Downloading and Installing a Module
from Drupal.org with Joe Shindelar In this tutorial, we’ll learn
how to download and install a module from drupal.org, using the user interface,
or by using Drush. By the end of this tutorial,
you’ll know how to download and install the
contributed Admin toolbar module, which allows you to easily browse
through the administration section of your website. Before you get started
with this tutorial, you’ll want to make sure
that you know what modules are, and how to find modules
that you want to install. If you want to install modules
via the user interface, the core Update Manager module
must be installed. And if you plan to use Drush, you’ll need to make sure
that you have Drush installed. See the written version of this tutorial
for links to each of these prerequisite tutorials. Note, you can use the administrative interface or Drush
to install a contributed module. If you are installing a custom module
rather than a contributed module, or if you see a message saying, “Installing modules and themes
requires FTP access to your server,” or if for some reason
the following steps don’t work to download and unpack
the module files, follow the steps in the Manually Installing a Module or
Theme tutorial. If you’re installing
a contributed module with external dependencies that are managed by Composer,
follow the steps for downloading in the Using Composer tutorial. First, we’re going to look at
at using the administrative interface. On the Admin Toolbar project page
on drupal.org, or that of whichever module
you want to install, scroll to the Downloads section
at the bottom of the page. Here, copy the address
of the tar.gz link. Then on your site,
in the Manage administrative menu, click on Extend. From the Extend page,
click Install new module. In the field Install from a URL, paste the value that you copied
from the module’s project page, and then click the Install button. This downloads the files
to the modules directory for your site. Once that’s completed,
click Enable newly added modules. This will take you back
to the Extend page. If you use the manual
upload procedure, you’ll be starting with this step, and reach the Extend page by using
the Manage Adminstrative menu, and navigating to Extend. Locate and check the box for
the Admin Toolbar module. Then, click on Install
to turn on the new module. Once the process is complete,
you’ll see a message indicating that the module has been enabled. If you want to use Drush
to install the module, first 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 page URL is drupal.org/project/admin_toolbar, admin_toolbar is the project name
that we need. Then, at the command line,
run the following Drush commands, giving the project name as a parameter. Start with drush dl, for download, and then the name of the project
that you’d like to download, followed by drush en, for enable, and the name of the project
that you would like to enable. When prompted, answer yes,
if you would like to continue. Once that’s complete, you should see
a message that tells you that the module admin_toolbar
was enabled successfully. In this tutorial,
we downloaded and installed a module using the
administrative interface provided by the Upgrade Manager module, and alternatively,
using the Drush command.

Leave a Reply

Your email address will not be published. Required fields are marked *