I am new to M2 and don't exactly know much about composer.

I am able to install extensions from GitHub or Magento store with composer just fine.

But I don't know what to do with extensions where "component name" is not provided. I want to be able to later easily update it like you can with composer.

So how do I install a downloaded extension via composer?

1 Answer 1


If You need extensions name, just open registration.php file directly in extension folder. There should be something like:

 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.


Magento_Captcha is extension name.

If you want enable new extension installed via composer run:
composer update composer install (depends)
php bin/magento module:enable Magento_Captcha
php bin/magento setup:upgrade
php bin/magento setup:di:compile

EDIT: To add new repo to composer use:
composer require username/project
For example https://github.com/weprovide/magento2-module-disablevisitorlog
compsoer require weprovide/magento2-module-disablevisitorlog

  • So what do I type in composer require ? Dec 14, 2017 at 10:51
  • I see, I just edited my post Dec 14, 2017 at 10:55
  • for this to work, it would require for the extension to be on the github, right? Dec 14, 2017 at 10:58
  • in composer.json You can see which repos you can use. There is section "repositories". You can easly add different. Anyway you can use also packagist.org to check which packages are public. Following example from post: packagist.org/packages/weprovide/… Dec 14, 2017 at 11:01
  • ah, I see, so I should be also be able to add a local path there? Dec 14, 2017 at 11:02

Your Answer

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

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