- Drupal 8 Development Cookbook(Second Edition)
- Matt Glaman
- 122字
- 2025-04-04 18:20:50
Installing a module with Drush
Modules can be downloaded and enabled through the command line using drush. The command to replicate the recipe would resemble the following:
$ drush pm-download honeypot $ drush pm-enable honeypot
As of Drush 9, which supports Drupal 8.3+, this section is deprecated. Using Drush to download Drupal core or contributed modules will throw a warning to use Composer instead.
It will prompt you to confirm your action. If there were dependencies for the module, it would ask whether you will like to enable those, too.
Drush simply downloads the archive available from Drupal.org. If the module or theme requires third-party PHP library dependencies, these will not be downloaded or be available in Drupal's class autoloading process.