Manage extensions
You can extend your Adobe Commerce application capabilities by adding an extension from the Commerce Marketplace. For example, you can add a theme to change the look and feel of your storefront, or you can add a language package to localize your storefront and Admin.
Composer name of an extension
Although this section discusses how to get the Composer name and version of an extension from Commerce Marketplace, you can find the name and version of any module in the Composer file of the module. Open the composer.json
file in a text editor and note the "name"
and "version"
values.
To get the Composer name of a module from the Commerce Marketplace:
-
Log in to Commerce Marketplace with the username and password you used to purchase the component.
-
In the upper right corner, click your username and select My Profile.
-
On the My Account page, click My Purchases.
-
On the My Purchases page, select a module that you purchased and click Technical Details.
-
Click Copy to copy the Component name to the clipboard.
-
Open a text editor and paste the component name and append a colon character (
:
). -
In Technical Details, click Copy to copy the Component version to the clipboard.
-
In the text editor, append the version number to the component name after the colon. For example:
code language-text extension-name/magento2:1.0.1
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:
-
On your local workstation, change to your project directory.
-
Create or check out a development branch. See branching.
-
Using the Composer name and version, add the extension to the
require
section of thecomposer.json
file.code language-bash composer require <extension-name>:<version> --no-update
-
Update the project dependencies.
code language-bash composer update
-
Add, commit, and push code changes.
code language-bash git add -A
code language-bash git commit -m "Install <extension-name>"
code language-bash git push origin <branch-name>
note warning WARNING When installing an extension, you must include the composer.lock
file when you push code changes to the remote environment. Thecomposer install
command reads thecomposer.lock
file to enable the defined dependencies in the remote environment. -
After the build and deploy finishes, use an SSH to log in to the remote environment and verify the extension installed.
code language-bash bin/magento module:status <extension-name>
An extension name uses the format:
<VendorName>_<ComponentName>
.Sample response:
code language-terminal 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:
-
On your local workstation, change to your project directory.
-
Enable or disable a module. The
module
command updates theconfig.php
file with the requested status of the module.Enable a module.
code language-bash bin/magento module:enable <module-name>
Disable a module.
code language-bash bin/magento module:disable <module-name>
-
If you enabled a module, use
ece-tools
to refresh the configuration.code language-bash ./vendor/bin/ece-tools module:refresh
-
Verify the status of a module.
code language-bash bin/magento module:status <module-name>
-
Add, commit, and push code changes.
code language-bash git add -A
code language-bash git commit -m "Disable <extension-name>"
code language-bash 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:
-
On your local workstation, change to your project directory.
-
Create or check out a development branch. See branching.
-
Open the
composer.json
file in a text editor. -
Locate your extension and update the version.
-
Save your changes and exit the text editor.
-
Update the project dependencies.
code language-bash composer update
-
Add, commit, and push your code changes.
code language-bash git add -A
code language-bash git commit -m "Update <extension-name>"
code language-bash 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.