Adobe Commerce 2.3 reached end of support in September 2022.

Add or update components

A contributing developer updates components by specifying components and their versions in Magento’s composer.json.

To update components if you’re not a contributing developer, see Updating the Magento application and components.

You can either add a require section to composer.json or you can use the composer require command as follows:

  1. Log in to the Magento server, or switch to, the file system owner.
  2. Change to the directory to which you cloned the Magento application. For example,

    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 to install

Command usage:

composer require <vendor>/<name>:<version>

For example:

composer require example/module:1.0.0

Wait while Composer updates dependencies and installs the component.

Add a require section to composer.json

Open composer.json in a text editor.

Add a require section like the following:

"require": {
  "<vendor>/<name>": "<version>",
  "<vendor>/<name>": "<version>"

Save your changes to composer.json, exit the text editor, and enter composer update

Related topics

If you have issues, see Composer troubleshooting.

If you have issues, see Composer troubleshooting.