How to Enable / Disable & Uninstall a Module in Magento 2?
Today, we’re going to teach you guys how to enable/disable & uninstall a module in Magento 2.
A module is basically a logical group or a directory that consists of controllers, blocks, helpers, models, etc. that is related to a particular feature.
In simple words, modules in Magento 2 helps to provide a particular feature by either implementing new functionality or extending existing functionality.
Now, in order to enable, disable, or uninstall a module, we need to first check the available modules installed on your Magento 2 store.
Step-by-Step Process to Enable/Disable & Uninstall a Module in Magento 2
To get the list of all available modules in Magento 2, log in to your Magento 2 installation root folder by using SSH via Terminal or Putty.cd;
After that, execute the following command to see the list of all available (both enabled & disabled) modules:
php bin/magento module:status
Now, there might be some conflicting modules that cannot be enabled at the same time.
So, we need to first find the dependencies of a module in the composer.json file.
Open the composer.json file of the module that you want to enable or disable and check its conflict field.
If there is no conflict, then you can go ahead and enable, disable, or uninstall a module.
To enable a module, execute the following command:
php bin/magento module:enable Schogini_Firstdataglobalgateway
To disable a module, use the following command:
php bin/magento module:disable Schogini_Firstdataglobalgateway
To uninstall a module, use the following command:
php bin/magento module:uninstall Schogini_Firstdataglobalgateway
And that’s about it!
With that, we’ve come to the end of this tutorial.
We hope that you found this tutorial helpful. If you have any questions, please ask them in the comments below.
And if you need our professional assistance, feel free to contact us at any time.