---
title: "Installing a module compatible with the current Drupal version"
date: "2024-02-14T06:18:38+00:00"
summary: "Learn how to add and enable Drupal modules using Composer or Drush, with step-by-step instructions for developers and site admins."
image:
type: "page"
url: "/resources/installing-module-compatible-current-drupal-version"
id: "cd849e74-1692-4ee5-9c06-6685185b1219"
---

You can add new features to Drupal by adding [modules](/definitions/module) from the [module archive at Drupal.org](https://www.drupal.org/project/modules) to your codebase.

If you are a Legacy Premium Remote Administration subscriber, you can [contact Acquia Support](/service-offerings/support#contact-acquia-support) to add and enable modules for you.

Adding modules to your codebase
-------------------------------

To add modules to your codebase, use one of the following methods:

*   [Adding a module using Composer](#adding-a-module-using-composer) (recommended)
*   [Adding a module using Drush](#adding-a-module-using-drush)

After adding the module to your codebase, [enable the module](#resource-d8-enable-module) using the Drupal interface, or with a Drush command.

### Adding a module using Composer

To add a new module to your codebase using Composer:

1.  Ensure you have Composer [installed locally in your development environment](../cloud-platform/develop/composer.html).
2.  Open a command prompt window to access your website’s code.
3.  Using the `cd` command, navigate to the directory containing your website’s `composer.json` file, which is typically the directory above your website’s [docroot](/definitions/docroot) directory.
4.  Run the following command:
    
        composer require drupal/[module_name]
    
    where `[module_name]` is the project name from Drupal.org. The preceding command will download the module to the appropriate place in your code repository, and add the following instructions to the `require` statement in your `composer.json` file, again replacing `[module_name]` with the project name from Drupal.org:
    
        "require": {
        "drupal/[module_name]": "1.x-dev"
        },
    
5.  Commit the changes to your branch and push the changes to your code repository. For information about deploying your code on Cloud Platform, see [Code workflows with Cloud Platform](/acquia-cloud-platform/manage-apps/code/environments).

After you have added a module, you should [enable](#resource-d8-enable-module) the module.

Note

To learn more about using Composer to manage dependencies, see [Using Composer to manage Drupal site dependencies](https://www.drupal.org/docs/develop/using-composer/using-composer-to-manage-drupal-site-dependencies) on Drupal.org.

For procedures you can use to set up and use Composer locally with your Cloud Platform-hosted websites, see [Using Composer with Drupal sites](/acquia-cloud-platform/develop-apps/composer). The Drupal community also offers support for using Composer [to install Drupal packages](https://www.drupal.org/docs/develop/using-composer) on Drupal.org.

### Adding a module using Drush

In some cases, you can also install and enable modules using a [Drush](https://www.drupal.org/project/drush) command, though Composer is the preferred method for the [current Drupal version](/service-offerings/guide/software-life-cycle#supported-drupal-version). To install and enable a module using Drush:

1.  Open a command prompt window to access your website’s code.
2.  Using the `cd` command, navigate to your website’s [docroot](/definitions/docroot) directory.
3.  To download the module, run the following command:
    
        drush dl [module_name]
    
    where `[module_name]` is the project name from Drupal.org. For example, the project name for the [Acquia Connector](https://www.drupal.org/project/acquia_connector) module is _acquia\_connector_, from `https://www.drupal.org/project/acquia_connector`
    
    Note
    
    You can append `-y` to the preceding command to accept the confirmation questions Drush displays.
    
4.  Commit the change to your branch and push the change to your code repository.

After you have added a module, you should [enable](#resource-d8-enable-module) the module.

Enabling a module in your codebase
----------------------------------

After [adding a module to your codebase](#resource-add-module-codebase), you can enable the module by either using Drush or by using the Drupal user interface.

### Enabling a module using Drush

To enable the module from the command line:

1.  Open a command prompt window to access your website’s code.
2.  Using the `cd` command, navigate to your website’s [docroot](/definitions/docroot) directory.
3.  To download the module, run the following command:
    
        drush en [module_name]
    
    where `[module_name]` is the project name from Drupal.org.
    
    Note
    
    You can append `-y` to the preceding command to accept the confirmation questions Drush displays.
    

After enabling your desired module, you should review [next steps](#resource-after-enabling-module) to complete the module’s configuration.

### Enabling a module using the Drupal user interface

To enable a module from the Drupal user interface:

1.  Sign in to your website as an administrator.
2.  Go to the Modules page by using one of the following methods:
    *   In the administrative menu, click **Extend**.
    *   In your browser’s address bar, go to `http://[your_site]/admin/modules` (where `[your_site]` is your website’s URL).
3.  In the module list, find the module you want to enable, and then select its checkbox.
4.  Scroll to the bottom of the webpage, and then click **Install**.

After enabling your desired module, you should review [next steps](#resource-after-enabling-module) to complete the module’s configuration.

Finding next steps
------------------

After you have added and enabled a module locally, you must configure the module’s settings or make changes to website user permissions. For more information, ensure you review the documentation provided either with your module or on your module’s Drupal.org project page.

For information about deploying your code on Cloud Platform, see [Code workflows with Cloud Platform](/acquia-cloud-platform/manage-apps/code/environments).