Skip to main content
Home
Drupal life hacks

Main navigation

  • Drupal
  • React
  • WP
  • Contact
  • About
User account menu
  • Log in

Breadcrumb

  1. Home

Installing Drupal Modules with Composer

By admin, 3 April, 2024

The command

composer require drupal/module_name

is used in Drupal to install a new module or package into your Drupal project using Composer.

 

Here, `drupal/module_name` should be replaced with the actual name of the module you want to install. For example, if you want to install the "Views" module, the command would be:

composer require drupal/views

This command will download the module and all of its dependencies, and then update your `composer.json` file and `composer.lock` file to reflect the changes. Finally, it will install the module into the appropriate directory within your Drupal project.

Tags

  • #Drupal Planet
  • Composer

Comments

About text formats

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
Powered by Drupal