Magento Themes and Magento Extensions

Quick Tip: Disable all Local Modules at Once

Share

While going through the study guide for the Magento Developer Exam, I’ve been learning a few interesting details that are squirreled away in the Magento code, but can be useful in day to day Magento development.

For example, while going through the section on Module loading, it is revealed that we can easily disable all modules living in the local (app/code/local) namespace by editing app/etc/local.xml and setting thedisable_local_modules node to true:

1
2
3
4
5
6
7
8
<config>
<global>
...
<disable_local_modules>true</disable_local_modules>
...
</global>
...
</config>

Of course, if you have cache enable, clear or disable it to see the effects.

This will immediately prevent Magento from loading any code from your local code pool. You could use this to troubleshoot issues with custom modules or local Mage overrides. Of course, to find the exact culprit would require disabling individual modules one by one but at least you can narrow down your area of search quickly this way.

Leave a Reply

You must be logged in to post a comment.