[[extend-module-install]]

=== Downloading and Installing a Module from _Drupal.org_

[role="summary"]
How to download and install a module from Drupal.org (using the user interface)
or by using Drush.

(((Module,downloading)))
(((Module,installing)))
(((Module,enabling)))
(((Module,contributed)))
(((Module,custom)))
(((Downloading,module)))
(((Installing,module)))
(((Enabling,module)))
(((Contributed module,downloading)))
(((Contributed module,installing)))
(((Functionality,extending)))
(((Drush tool,using to install module)))
(((Admin Toolbar module,downloading)))
(((Admin Toolbar module,installing)))
(((Module,Admin Toolbar)))
(((Update Manager module,using to install module)))
(((Module,Update Manager)))
(((Drupal.org website,downloading and installing module from)))

==== Goal

Download and install the
https://www.drupal.org/project/admin_toolbar[contributed Admin Toolbar module],
which allows you to easily browse through the administration section of the
website.

==== Prerequisite knowledge

* <<understanding-modules>>
* <<extend-module-find>>
* <<install-tools>>

==== Site prerequisites

* If you want to install modules via the website, the core Update Manager module
must be installed. See <<config-install>> for instructions on installing
modules.

* If you want to use Drush, Drush must be installed. See <<install-tools>>.

==== Steps

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 <<extend-manual-install>>. If you are using
Composer to manage the files in your site, follow the steps for downloading in
<<install-composer>>. 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

. 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.

. 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_.
+
--
// Downloads section of the Admin Toolbar project page on drupal.org.
image:images/extend-module-install-download.png["Finding a module URL"]
--

. In the _Manage_ administrative menu, navigate to _Extend_
(_admin/modules_). The _Extend_ page appears.

. Click _Install new module_. The _Install new module_ page appears.
+
--
// Install new module page (admin/modules/install).
image:images/extend-module-install-admin-toolbar-do.png["Installing a module from a URL"]
--

. In the field _Install from a URL_, paste the copied download link. This value
could look like this:
_https://ftp.drupal.org/files/projects/admin_toolbar-8.x-1.14.tar.gz_

. Click _Install_ to upload and unpack the new module on the server. The files
are being downloaded to the _modules_ directory.

. 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_).

. Locate the _Admin toolbar_ module and check it.

. Click _Install_ to turn on the new module.

===== Using Drush to install a module

. 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".

. Download the module using either the steps in <<extend-manual-install>> or
<<install-composer>>.

. Run the following Drush command, giving the project name (for example,
`admin_toolbar`) as a parameter:
+
----
drush en admin_toolbar
----

. Follow the instructions on the screen.

==== Expand your understanding

* Verify that the
https://www.drupal.org/project/admin_toolbar[contributed Admin Toolbar module]
is working by browsing through the menu in the administration section.

* Install and configure the
https://www.drupal.org/project/pathauto[contributed Pathauto module]
so that content pages in your site get nice URLs by default. See
<<content-paths>> for more on URLs.

* If you do not see the effect of these changes in your site, you might need
to clear the cache. See <<prevent-cache-clear>>.


//==== Related concepts

==== Videos

// Video from Drupalize.Me.
video::https://www.youtube-nocookie.com/embed/GJWS2TLtEpk[title="Downloading and Installing a Module from Drupal.org"]

==== Additional resources

* https://www.drupal.org/node/340271[_Drupal.org_ community documentation page "Contributed modules"]
* https://www.drupal.org/download["Download and Extend" page on _Drupal.org_]
* https://www.drupal.org/project/admin_toolbar[Admin Toolbar module on _Drupal.org_]


*Attributions*

Written and edited by https://www.drupal.org/u/batigolix[Boris Doesborg] and
https://www.drupal.org/u/jhodgdon[Jennifer Hodgdon].
