5

I'd like to know if its possible to manually disable a module by changing some code like in Magento 1. I know the SSH way.

  • 3
    Go to app/etc/config.php and disable a module by changing it's value from 1 to 0. – Aaron Allen Jan 22 '17 at 3:34
10

You can always use CLI command for managing modules.

Disable module:

$ bin/magento module:disable Vendor_ModuleName

Enable module:

  $ bin/magento module:enable Vendor_ModuleName

And you can check status of all modules:

$ bin/magento module:status

It is useful to build a habit of controlling your installation via bin/magento. Also it will help to avoid any new features introduced for module commands.

9

In order disable a module manually, you need to do some changes at app/etc/config.php

In this file, magento save value flag value 0 or 1 of each module.

  • 1 means Modules is enabled
  • 0 Means Modules is disabled

As , you want to disable the module then you need change it value to 0.

Then go to var folder and clear cache,page_cache folder.

Example

Suppose.your config.php look like

<?php
return array (
  'modules' => 
  array 
.......
    'Magento_CheckoutAgreements' => 1,
    'Magento_Payment' => 1,
    'Magento_SampleData' => 1,
    'Magento_CmsUrlRewrite' => 1,
    'Magento_Config' => 1,
    'Magento_ConfigurableImportExport' => 1,
    'Magento_Downloadable' => 1,
    'Magento_Wishlist' => 1,
.....
  ),
);

Then you want to disable then you need make 'Magento_CheckoutAgreements' => 1, to 'Magento_CheckoutAgreements' => 0,

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.