Hello to Amasty blog readers!

Today we’re announcing the availability of Amasty extensions for Magento 2 in our official repository, from which you can now install our modules with the help of the Composer.


Only Amasty extensions for Magento 2 are available via the repository. Right now, Magento 1 extensions from Amasty are not available there.

Why we are opening the official Amasty repository

The decision to develop this opportunity was made because a lot of Amasty clients asked for this option to have some additional installation and updates safety, as well as the convenience of maintaining the extensions. For advanced users, it’s a new option to install or update the extensions via the command line, which is fast and hassle-free.

What is more, with this option we’re solving a common problem some of our clients faced when buying Amasty extensions for Magento 2 from Magento Marketplace.

Before, if the user had installed the extension from the Marketplace, and then installed the new version obtained from Amasty.com website (using the package manually, not via the Composer), he or she would lose all the settings. Now this issue is solved, because you can use the Amasty repository for updating extensions, and this way no extension settings are lost now.

How to install extensions from Amasty repository via Composer

The following instruction assumes that you have already installed and set up the Composer tool. If you haven’t installed it yet learn how to do it here.

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

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:

[php]composer config repositories.amasty composer [/php]

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 generated in your Customer Account :

Amasty.com → Account → My Access Keys

Use the Public Key as a login and the Private Key – as a password.

NEW: How to save Access Keys?

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

For this:

#1. Save the keys manually in the repository;
#2. Go to your Magento docroot directory to insert: composer config –auth http-basic.composer.amasty.com $COMPOSER_AMASTY_USERNAME* $COMPOSER_AMASTY_PASSWORD**


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.com → Account → My 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:

[php]composer require amasty/color-swatches-pro [/php]

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

Step 7. To install the module execute the command:

[php]php bin/magento setup:upgrade [/php]

Extension Update via Composer

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

[php]composer update [/php]

Instead of the ‘composer_name’ please specify the corresponding module name which is indicated in your customer account. 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:

[php]composer require ^x.0.0  - -update-with-dependencies[/php]

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:

[php] composer require amasty/shopby ^2.0.0  - -update-with-dependencies[/php]

2. To update all modules execute the command:

[php] composer update [/php]

Delete Extensions via Composer

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

[php] composer delete [/php]

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

Do you have any questions? Feel free to ask them in the comments section. Also, if you’re experiencing troubles with this way of installation, feel free to drop a line at support@amasty.com, we’d love to help you right away!