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

  • author-img Nidhi Arora
  • 6 years
  • 193 views

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

Communication is the key for us to understand each other. Allow us to understand
your requirements or queries. Present us with an opportunity to serve you.

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

    Head Office

    1250 Pittsford Victor Road Ste 310
    Pittsford, NY 14534

    Development Center

    Plot no. 10, Rajiv Gandhi
    Chandigarh Technology Park