User Tools

Site Tools


Sidebar

magento_2:composer_user_guide

Composer User Guide

This manual assumes that you have already installed and set up the Composer tool. If you haven't installed the Composer yet see the instruction on How to install it.

To work with the Amasty Composer you need to create a Customer Account on Amasty.com (to get Access Keys).


Extension Installation via Composer

Step 1. Log in to your server via a Command line:


Step 2. Set the directory where you would like to install the extension. Usually, for such purposes, the Magento root folder is selected.


Step 3. Connect to the Amasty Composer Repository:

 composer config repositories.amasty composer <path>

In the <path> indicate:

  •  https://composer.amasty.com/community/

    - for community extensions.

  •  https://composer.amasty.com/enterprise/

    - for enterprise extensions.


Step 4. To get authorized use Access Keys generated in your Customer Account :

Amasty.comAccountMy Access Keys

You will be asked for login and password when you try to install the package from Amasty composer repository for the first time. Use the Public Key as a login and the Private Key – as a password.

You can save the keys in the repository, so you won’t have to get authorized every time.

Step 5. After the authorization is successfully finished, you can start installing/updating your modules.

First, take a look at the module names in your Customer Account to make sure you call the necessary module via the Composer correctly.

Please go to Amasty.comAccountMy Downloads for paid extensions and open the My free products tab for free modules.

You will find module names for the Composer in the 'My Composer Packages' section.


Step 6. To install the module, please execute the following command:

 composer require amasty/color-swatches-pro 

Instead of the 'color-swatches-pro' please specify the module you need.


Step 7. To upgrade the module please execute the command:

 php bin/magento setup:upgrade 


Extension Update via Composer

The extension update process is the same as the module installation process. To update the extension, simply execute the command:

 composer update  <composer_name> 

Instead of the 'composer_name' please specify the corresponding module name which is indicated in your customer account.

IMPORTANT: This command updates only the last two version numbers: e.g. 1.x.x ( only x.x will be updated).

To update the version from 1.x.x to 2.x.x you need to execute the following command:

composer require <composer_name> ^x.0.0 --update-with-dependencies 

Where x corresponds to the first version number. For example, to update the Improved Layered Navigation Extension for M2 from the 1.x.x version to the 2.x.x version you need to execute the command:

 composer require amasty/shopby ^2.0.0 --update-with-dependencies

To update all modules execute the command:

 composer update 


Delete Extension via Composer

To delete the extension via Composer, please execute the command:

 composer remove  <composer_name> 

Instead of the 'composer_name' please specify the corresponding module name which is indicated in your customer account.

magento_2/composer_user_guide.txt · Last modified: 2017/10/20 09:34 by prakapovich