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 ?
-
Is it the extension on a public or private composer repository?Barbanet– Barbanet2016年05月30日 00:39:36 +00:00Commented 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.htmlalexcr– alexcr2016年05月30日 01:25:35 +00:00Commented May 30, 2016 at 1:25
-
what is the file location when you install it through composerHarris– Harris2022年03月22日 21:25:48 +00:00Commented Mar 22, 2022 at 21:25
3 Answers 3
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
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!
-
but in my root folder there is already a composer.json , is not that gonna affect in any way ?alexcr– alexcr2016年05月30日 08:18:52 +00:00Commented May 30, 2016 at 8:18
-
2You can make a backup copy of
composer.jsonfirst. Use the commandcomposer require <module name>, where<module name>is located in<sample module root dir>/etc/module.xmlas the value ofmodule name=. That updatescomposer.jsonso all you have to do is runcomposer updateto install it.Steve Johnson– Steve Johnson2016年05月30日 14:26:46 +00:00Commented May 30, 2016 at 14:26
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