


To enable Drupal modules with Drush, run the following command drush pm:enable module_1, module_2

It's useful since the list of core modules is mostly the same for all Drupal sites that are on the same major version of Drupal core. The -no-core option will filter out all core modules from the list. If you'd like to filter by status you can use the -status option that takes one of two available values: disabled or enabled. Run drush pm:list -type module to get a list of all the modules available on your site.īy default the command returns a list of all extensions, regardless of whether they are enabled or disabled. This allows you to filter the extension by its type: module or theme. The command allows passing in some options. The drush pm:list command allows you to see a list of all available extensions - modules and themes - on your site. If you want to learn more about managing your site with Composer, please refer to the Introduction to Composer for Drupal Users series. It also allows for easy patching and version management. Managing extensions with Composer is beneficial since it will not only load the extensions themselves but also their dependencies such as additional required libraries and packages.
DRUPAL INSTALL MODULE DOWNLOAD
Older tutorials will often refer to the drush pm:download or drush dl command to download a contributed module from. Now Composer is recommended to manage dependencies therefore, the list of pm commands has been reduced, removing some dependency management related commands. In the earlier versions of Drush, prior to Drupal's adoption of Composer for dependency management, the list of pm commands was longer. These commands are part of Drush, in the project manager group, and start with the pm prefix.
DRUPAL INSTALL MODULE HOW TO
Use Drush to check for security updates for modules, themes and PHP packagesīy the end of this tutorial you'll have an understanding of the project manager commands that come with Drush, how to use them, and how to speed up common workflows and maintenance tasks.All of these commands start with the pm prefix, and are part of the project manager group.Ĭommon use cases for the project manager commands include: quickly enabling/disabling modules via the CLI rather than performing numerous clicks in the UI, and as part of CI/CD process that lists (or maybe even automates) security updates. These commands can check which modules are present in a site's codebase, report their security status, enable modules, and display metadata for modules and themes. Drush comes with a group of commands that aid in managing projects from the command line. Every Drupal site consists of many Drupal projects like modules and themes.
