How to install an Amasty extension?

How to install an Amasty extension?

Follow these steps to install Amasty modules in your Magento environment:

Step 1. To download and install Magento modules, the vendor repository is required. The Amasty repository can be added with the next command:

composer config repositories.amasty composer <path>

Instead of <path>, indicate the repository for a specific Magento edition: 
https://composer.amasty.com/community - for community extensions.
https://composer.amasty.com/enterprise/ - for enterprise extensions.


Step 2. The customer will be asked for a login (Public Key) and password (Private Key) when trying to install the package from the Amasty Composer repository for the first time. Access keys can be found and generated in the customer account in License Registration tab inside projects (if you don't have any projects yet, please create one following the hints from the page):





It is possible to manually save the keys in the repository, so there is no need to get authorized every time. Find the Magento root directory and indicate:

composer config --auth http-basic.composer.amasty.com $COMPOSER_AMASTY_USERNAME $COMPOSER_AMASTY_PASSWORD


Where 
$COMPOSER_AMASTY_USERNAME is the Public Key and  $COMPOSER_AMASTY_PASSWORD is the Private Key.

Otherwise, when the customer will be asked for access keys for the first time, they need to agree to save the credentials by printing yes.

     
Step 3. To install the module, the following command should be used:

composer require amasty/<module-name>

Here <module-name> is the Composer name of the extension you are installing. To find the Composer name of the module, open the Products tab of your account and find the Composer packages section:


Step 4. Execute the following commands after the extension is installed:

php bin/magento setup:upgrade
php bin/magento setup:di:compile 
php bin/magento setup:static-content:deploy (your locale)
      
Notes
In case the Hyvä theme is used, kindly make sure to execute the following commands to regenerate styles after installing the Amasty Hyvä package:

php bin/magento hyva:config:generate -f
cd vendor/hyva-themes/magento2-default-theme/web/tailwind
npm run build-prod

For more information about Composer and its options to manage Amasty extensions, refer to our Composer guide