29
January
Open a terminal and go to the root directory of your Drupal project.
cd /path/to/your/drupal-project
Use the following Composer command to download the module:
composer require drupal/module_name
Replace module_name
with the actual machine name of the module. For example, to install the Pathauto module:
composer require drupal/pathauto
This will download the module and place it inside the web/modules/contrib/
directory.
After installation, clear the cache to ensure Drupal recognizes the new module:
If Drush is installed then you can use the following command to clear cache
drush cache:rebuild
If drush not installed then you can clear the cache from the Drupal Admin UI under:
Administration → Configuration → Performance → Clear Cache
Enable the module using Drush:
drush en module_name -y
For example
drush en pathauto -y
Alternatively, enable the module from the Drupal Admin UI:
Extend → Find the module → Check the box → Click "Install"
© 2023.ZedAngle. All Rights Reserved.