5

I'm using magento 2 , and I'm trying to install an extension from composer.json file , now I've installed composer through SSH , but I'm new to composer installations , how do I proceed now with the installation ?

3
  • Is it the extension on a public or private composer repository?
    – Barbanet
    May 30, 2016 at 0:39
  • I think is public , not sure about that , as I told you I'm new to composer , by the way this is the extension marketplace.magento.com/addshoppers-social-login.html
    – alexcr
    May 30, 2016 at 1:25
  • what is the file location when you install it through composer
    – Harris
    Mar 22, 2022 at 21:25

3 Answers 3

12

Follow below steps to install magento2 extension (2.1.7)

cd <your Magento install dir>
composer require <component-name>:<version> --no-update
composer update
bin/magento setup:upgrade
bin/magento setup:di:compile

Source: http://devdocs.magento.com/guides/v2.1/cloud/howtos/install-components.html

6

For Composer installation see here official Site of composer. After installation it, You can install Magento 2 extensions with Composer: add an extension's package to the root composer.json and then do composer update and bin/magento setup:upgrade. Now clear the cache bin/magento cache:clean.

Done!

2
  • but in my root folder there is already a composer.json , is not that gonna affect in any way ?
    – alexcr
    May 30, 2016 at 8:18
  • 2
    You can make a backup copy of composer.json first. Use the command composer require <module name>, where <module name> is located in <sample module root dir>/etc/module.xml as the value of module name=. That updates composer.json so all you have to do is run composer update to install it. May 30, 2016 at 14:26
2

This is the sample how to install the Adm Developer Toolbar using the composer.

composer require vpietri/adm-quickdevbar &&
php bin/magento --clear-static-content module:enable ADM_QuickDevBar && 
php bin/magento setup:upgrade

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.