简体   繁体   中英

Disable Magento Extension from database

Is there a way to disable a magento extension from the database? We can't access our admin area due to a corrupt extension so we can't disable the extension from the admin section..

If it is a properly created Magento extension, it will have a control file in app/etc/modules . You want to use this file to disable the extension as it prevents the module from loading. Disabling in the database allows the code to load but disables its output, an important distinction for something that is causing Magento to fail in its operation.

In this file will be a line, true . Change true to false and the module will be prevented from loading and executing.

Sample code for module Desitex_Checkoutnewsletter

<?xml version="1.0"?>
<config>
    <modules>
        <Desitex_Checkoutnewsletter>
            <active>true</active>
            <codePool>community</codePool>
            <depends>
                <Mage_Checkout />
            </depends>
        </Desitex_Checkoutnewsletter>
    </modules>
</config> 

If you want to disable a particular extension all you have to do is to change the active block to false. You can use any ftp program which supports file editing to change the extension status to false. Just open app/etc/module/Namespace_Module.xml in your favorite editor and change it as shown below:

<?xml version="1.0"?>
<!-- 
/**
 * @category   Magik
 * @package    MagentoMagik_Salepro
 * @author     Ashish Nayyar @ MagentoMagik
 * @license    http://www.magentomagik.com  Open Software License (OSL 3.0)
 */
 -->
<config>
    <modules>
        <Magik_Salepro>
            <active>false</active>
            <codePool>local</codePool>
        </Magik_Salepro>
    </modules>
</config>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM