Manage modules and extensions
Contributing developers upgrade modules and extensions by specifying their versions in the Adobe Commerce composer.json
file. If you are not a contributing developer, see Perform an upgrade.
You can either add a require
section to the composer.json
file or you can use the composer require
command as follows:
-
Log in to your server.
-
Switch to the file system owner.
-
Change to the directory where you cloned the application. For example,
code language-bash cd /var/www/magento2
You have the following options:
Get available module versions
Command usage:
composer show --all <vendor>/<name>
For example:
composer show --all example/module
Use the composer require
command
Command usage:
composer require <vendor>/<name>:<version>
For example:
composer require example/module:1.0.0
Wait while Composer updates dependencies and installs the module.
Add a require
section to the composer.json file
-
Open the
composer.json
in a text editor. -
Add a
require
section.code language-json "require": { "<vendor>/<name>": "<version>", "<vendor>/<name>": "<version>" }
-
Save your changes to the
composer.json
file and exit the text editor. -
Resolve dependencies and write exact versions to the
composer.lock
file.code language-bash composer update