Extension (Module) Activate / Process of Installation

Magento 2 Extension Installation

To install an extension on the Magento site 1st you need to download the extension file from an authentic source and have to check is that compatible with your Magento version.

  1. First of all, php bin/magento maintenance:enable to make the site on maintenance mode.
  2. Then go to /var/www/html/app/code directory: extract your module file which will be like VendorName (folder) and Module (folder). Module folder will go under the VendorName folder. (You can do it manually through WinSCP, zip vendor and upload it in that directory or just upload vendor folder)
  3. Then go back to html, run php bin/magento module:status via command line, and check the deactivate module list that your extracted extension available on the deactivated list.
  4. Activate that extension by running php bin/magento module:enable VendorName_ModuleName.
  5. Then check again the module status of that extension is now on activate status or not php bin/magento module:status
  6. run these commands sequentially as bellow:
  • php bin/magento setup:upgrade
  • php bin/magento setup:di:compile
  • php bin/magento setup:static-content:deploy –f
  • php bin/magento indexer:reindex
  • php bin/magento cache:flush
  • chmod -Rf 777 generated var pub
  • php bin/magento maintenance:disable

After that restore CSS

 

If you got any problem during this process:
  1. First of all, go to /var/www/html directory:
    php bin/magento maintenance:enable to make the site on maintenance mode. 
  2. Find out the extension you want to remove from the site.
  3. Run php bin/magento module:status command to see list of active and deactivate extensions.
  4. Select the extension you want to remove and find out the status of the extension. If the extension
    is on the active status, please deactivate that by running
    php bin/magento module:disable Vendor_Modulename –clear-static-content.
  5. Then check again the module status of that extension is now on deactivate status or not.
  6. After
    that remove the related file of that extension and run these commands sequentially as bellow:
  • php bin/magento setup:upgrade
  • php bin/magento setup:di:compile
  • php bin/magento setup:static-content:deploy –f
  • php bin/magento indexer:reindex
  • php bin/magento cache:flush
  • chmod -Rf 777 generated var pub
  • php bin/magento maintenance:disable

 

After that restore CSS