How to install a module in Drupal 8?

¿Cómo instalar un módulo en Drupal 8?

First of all, let's define what a module is and what it is used for.

Modules are elements that allow you to add new features to Drupal, to adapt it to the needs of each website. In other words, they are “plugins” that expand its possibilities and functionalities.

Now, to download and install any Drupal module, we must search for it on the  official modules page for Drupal .      

The page will show us an interface like the one seen below:

form

It is a fairly easy to understand and use interface, as it will give us the option to search for modules by name, or different filters. These filters will help us a lot when searching for a specific module, as we can establish search values ​​such as the Drupal version for which we need the module, stability, search modules, etc.   

Having said this, we will look for the module we want, and we will have 3 options to install it in our Drupal:

1. Install with Composer : It is recommended to download the module through Composer, this way we ensure that it is compatible with the Drupal Core.

(Composer is a dependency manager for PHP that allows us to download packages from a repository to add it to our project.

more information about Composer )

We enter our project folder and write the following command:

$ composer require drupal/(module name)

By writing the command and pressing (Enter), we will see how our module is downloaded

drupal

Now we will install it, we go to the “Expand” section in our Drupal, and we look for the name of the module that we downloaded, in this case we will use the module called “Admin Toolbar”

Interface

We select the 3 modules and install:

selection

2.  Download the module from the Drupal.org URL

discharge

Instead of downloading the module, we copy the link and install

facility

3.  Downloading the module from the drupal.org links:

Once the module has been chosen, we download it:

drupal

It is important  NOT to unzip the file

module

We go to the “Extend” section, install new module, upload the file and install it:

drupal

In conclusion, modules are mandatory in Drupal if we want to get the most out of our website, they are necessary tools that will provide a wide variety of options and improvements.