How to Enable and Disable Custom Magento Extension ?
The only way to really disable your module is to change
in your app/etc/modules/foo.xml
If you want an admin account to be able to do it in the back-end, you can create a config option (with system.xml) to control your module. Although it's not exactly the same as disabling your module, you can make sure your module doesn't do anything by looking at the store config.
Below are the three ways to disable the modules.
- Disabling modules in the Magento backend :
Go to Magento backend - System > Configuration > Advanced > Disable modules output you can easily disable certain modules. You can even select the scope of the configuration (in the top left of the page) and there for disable specific modules only for specific Store Views. This is actually the preferred way of disabling a module.
(This only disables the output. This means especially, that all the computation is still done, means: Doesn't improve performance!)
Modifying XML-files : In the directory app/etc/modules you can find a bunch of XML-files. While the Magento core-modules are bundled in just a couple of files, in most cases you will find per third party module also a separate XML-file. When you open up the XML-file of for instance our MageBridge extension, you will find the following:
<config> <modules> <Namespace_Module> <active>true</active> <codePool>community</codePool> </Namespace_Module> </modules> </config>
Now to disable this module, you would change the active-tag from true to false.
Remember to flush the Magento cache.
Disabling local modules :
But this might not solve your problem. If some module is placed in the
app/code/local directory it might be overriding a Magento core-class directly, without the use of XML-files. To bypass this problem, you need to temporarily disable all local modules.
This can be done by opening up the file
app/etc/local.xml in which you should change the disable_local_modules-tag to true.
This should allow you to troubleshoot the problem. Of course there are many more things to troubleshoot when dealing with serious problems, but at least this is a start.
I stumbled over another way to disable extension in an answer to my own question (admitedly very similar to this one) in this regards which I wanted to share here.
This was provided by @nintenic (thanks for that) :
- In your FTP go to
app/etc/modules. This is where all the extension xml files are located.
- Create a new folder here called "disabled".
- Move the xml file of the extension you wish to disable to this new folder
- Now log into the Magento backend and go to
> System > Cache Management.
Click Flush Magento Cache to have Magento recognize the changes.