Wednesday, May 24, 2017

Download drupal contributed module in Drupal 8 using composer

Use the following commands to download and install in drupal 8 contributed module using Composer.

composer require drupal/{module_name} {version}

Example: composer require drupal/devel 1.0-beta1

Once execute the above command, this will download the module (not installed). For install, we need the execute the drush or drupal console command to install the module.

Via Drush: drush en {module_name}
Via Drupal console: drupal module:install {module_name}

3 comments: