Magento: Enabling modules via local.xml

I wanted to enable some modules only locally, without the possibility to use them on production. This would eliminate a vulnerability of leaking debug data. As an example I will use Magneto Debug module.

To enable a module only locally and keep it turned off anywhere else.

  1. In app/etc/modules/Magento_Debug.xml delete the line
  2. In app/etc/local.xml add the following lines

Deleting the line from app/etc/modules/Magento_Debug.xml is required, because Magento firstly loads app/etc/local.xml and then overloads its content.

Leave a comment

Your email address will not be published. Required fields are marked *