Search code examples
magentozend-frameworkmagento2magento-2.0

How to add/Insert Extension in magento 2.0?


I tried to add the external magento-2 extension but I can't add it because I can't find magento-connect in admin side. I think the admin panel doesn't have magento-connect. Do you have any idea about this to share, or a good tutorial that could help?


Solution

  • Installing Magento 2 extension is an easy task .. you just need to extract your extension zip file and place the folder inside your Magento 2 app/code directory so that the structure should be like app/code/namespace/module-name

    then you have to run some commands for registering your Magento 2 extension

    open terminal inside your Magento 2 directory, parallel to the app directory

    run these commands-

    1. giving read write permission to your magento 2 directory

      sudo chmod -R 777 /path of Magento 2 folder such as /opt/lampp/htdocs/Training/Magento_2.0

    if you are using linux operating system then you have to run this command . for windows it is not necessary.

    1. for registering your extension

      /opt/lampp/bin/php bin/magento module:enable Namespace_Modulename /opt/lampp/bin/php bin/magento setup:upgrade

    2. for compiling your extension code

      /opt/lampp/bin/php bin/magento setup:di:compile

    now flush your cache , delete cache folder from your Magento 2 var directory.