Magento 2 | Install or deactivate 3° party extension

February 7th, 2019

I need to add an extension that i have bought on Magento store:

First i need to connect to the magento store and download the extension ( be sure to check that you are downloading the right extension version, for your magento version ).

INSTALL or ACTIVATE MDULE

Next, i need to connect to my ftp, and upload the module on “app/code/vendorname/appname”.

Now we need to connect to the CLI via SSH , you can read how to do that here, and:

– Updates the Magento software :


php bin/magento setup:upgrade

– Generated code and dependency injection configuration :


php bin/magento setup:di:compile

– Deploy the magento deploy static view files :


php bin/magento setup:static-content:deploy

If in this step you had an error like this one:


[Magento\Framework\Exception\LocalizedException]
NOTE: Manual static content deployment is not required in "default" and "de
veloper" modes.
In "default" and "developer" modes static contents are being deployed autom
atically on demand.
If you still want to deploy in these modes, use -f option: 'bin/magento set
up:static-content:deploy -f'

simply add -f at the end of the last command


php bin/magento setup:static-content:deploy -f

That’s all, now you can write in terminal:


php bin/magento module:status

So you retrieve the list of all modules including their enable / disable status.
Scroll the list and under ” List of enabled modules: ” you find your new module “vendorname_modulename”.
That’s means that your module i sactive

If you prefer you can navigate to the backend, and search for features installed by the new module.

DEACTIVATE MODULE

for deactivate a module ( without remove )


magento module:disable vendorname_modulename

If you need to find the right name of the module you want to disable type in console:


php bin/magento module:status

If you enabled one or more modules, run the following command to update the database:


bin/magento setup:upgrade

That’s all.