How to Enable/Disable Magento 2 Modules in The Shell?

  • author-img Nidhi Arora
  • 9 years

Sometimes, it is urgently required to enable or disable currently available Magento 2 modules. And, you don’t have enough time to do it manually. You will be happy to know that you can enable/disable such modules in the shell. The blog post is going to show you how to enable or disable Magento 2 modules in the shell instead of doing it manually:

How to Disable Magento 2 Module?

Run the following commands to disable a module:

php -f index.php -- module-disable --modules=Envision_Testmod

The following modules have been disabled: Envision_Testmod

How to Enable a Magento 2 Module?

Run the following commands to enable a module:

php -f index.php -- module-enable --modules=Envision_Testmod

The following modules have been enabled: Envision_Testmod

How to ensure that the enabled modules are accurately registered?

To ensure that the enabled modules are accurately registered, you need to run ‘update’ command:

php -f index.php — update

The setup tool updates app/etc/config.php

Download Blog

ENQUIRY

Ready to Get Started?

Fill out the form and out team will get back to you
within 24 hours

    Head Office

    815 Brazos St STE 500, Austin,
    TX 78701, USA