Enabling/Disabling a Module in Magento 2

How can you enable or disable a module in Magento 2 from the command line?

Which of the following commands is used to toggle a module in Magento 2 from the command line?

  • A) php bin/magento module:toggle
  • B) php bin/magento module:enable-disable
  • C) php bin/magento module:activate
  • D) php bin/magento module:deactivate

Answer:

To enable or disable a module in Magento 2 from the command line, use the php bin/magento module:disable and php bin/magento module:enable commands.

To enable or disable a module in Magento 2 from the command line, you can use the following commands:

Disable a Module: php bin/magento module:disable Module_Name

For example, if you want to disable the Mage_Catalog module, you would use the command:

php bin/magento module:disable Mage_Catalog

Enable a Module: php bin/magento module:enable Module_Name

Using the same example, the command to enable the Mage_Catalog module would be:

php bin/magento module:enable Mage_Catalog

← Designing a java program for sales tax calculation Understanding the global positioning system gps in a positive light →