Install an extension

Adobe recommends working in a development branch when adding an extension to your implementation. When installing an extension, the extension name (<VendorName>_<ComponentName>) is automatically inserted in the app/etc/config.php file. There is no need to edit the file directly.

To install an extension:

  1. On your local workstation, change to your project directory.

  2. Create or check out a development branch. See branching.

  3. Using the Composer name and version, add the extension to the require section of the composer.json file.

    composer require <extension-name>:<version> --no-update
    
  4. Update the project dependencies.

    composer update
    
  5. Add, commit, and push code changes.

    git add -A
    
    git commit -m "Install <extension-name>"
    
    git push origin <branch-name>
    
    WARNING
    When installing an extension, you must include the composer.lock file when you push code changes to the remote environment. The composer install command reads the composer.lock file to enable the defined dependencies in the remote environment.
  6. After the build and deploy finishes, use an SSH to log in to the remote environment and verify the extension installed.

    bin/magento module:status <extension-name>
    

    An extension name uses the format: <VendorName>_<ComponentName>.

    Sample response:

    Module is enabled
    

    If you encounter deployment errors, see extension deployment failure.

Manage extensions

When you add an extension using Composer, the deployment process automatically enables the extension. If you already have the extension installed, you can enable or disable the extension using the CLI. When managing extensions, use the format: <VendorName>_<ComponentName>

Never enable or disable an extension while logged in to the remote environments.

To enable or disable an extension:

  1. On your local workstation, change to your project directory.

  2. Enable or disable a module. The module command updates the config.php file with the requested status of the module.

    Enable a module.

    bin/magento module:enable <module-name>
    

    Disable a module.

    bin/magento module:disable <module-name>
    
  3. If you enabled a module, use ece-tools to refresh the configuration.

    ./vendor/bin/ece-tools module:refresh
    
  4. Verify the status of a module.

    bin/magento module:status <module-name>
    
  5. Add, commit, and push code changes.

    git add -A
    
    git commit -m "Disable <extension-name>"
    
    git push origin <branch-names>
    

Upgrade an extension

Before you continue, you need the Composer name and version for the extension. Also, confirm that the extension is compatible with your project and Adobe Commerce version. In particular, check the required PHP version before you begin.

To update an extension:

  1. On your local workstation, change to your project directory.

  2. Create or check out a development branch. See branching.

  3. Open the composer.json file in a text editor.

  4. Locate your extension and update the version.

  5. Save your changes and exit the text editor.

  6. Update the project dependencies.

    composer update
    
  7. Add, commit, and push your code changes.

    git add -A
    
    git commit -m "Update <extension-name>"
    
    git push origin <branch-names>
    

If you encounter errors, see Recover from component failure. To learn more about using extensions with Adobe Commerce, see Extensions in the Admin Guide.

Previous pageCustom theme
Next pageB2B module

Commerce