2

While learning to build Magento 2 extensions, I have come across several tutorials (blogs, books and videos) teaching me different things. When it comes to registering a new extension, some tutorials ask me to manually add my extension to the app/etc/config.php file, while others say it is out of place to manually edit the app/etc/config.php.

Is it right to manually add an extension to the configuration (app/etc/config.php) file?

3

It is not ideal process to Add an extension directly from app/etc/config.php.

In other to add an extension you have to run

php bin/magento module:enable {Vendorname}_{ModuleName}

After running this command a record inserted at config.php ` like

{Vendorname}_{ModuleName} => 1

then you have to run setup upgrade command

php bin/magento setup:upgrade

Note that running, of Module disable command makes `

{Vendorname}_{ModuleName} => 0`

php bin/magento module:disable {Vendorname}_{ModuleName}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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