0

I need to remove several extensions that were originally installed via FTP.

I can disable the extensions by changing the status from True to False in xml file, which will deactivate extension only. But, I would like to remove the extension files with all their files.

  • Have you checked the downloader section in magento. There you can find the list of modules/ extensions you have uploaded. From there you can uninstall them – Vivek Khandelwal Feb 14 '17 at 5:43
  • The downloader section includes extension that were installed using magentostore key. I am talking about FTP uploaded extensions. – Icon Feb 14 '17 at 5:44
  • @Icon, have you find the solution? please check once my answer. that will helps you. – Teja Bhagavan Kollepara Mar 17 '17 at 9:56
4

If you want to remove Magento extension manually, follow the steps below:

1- Disable the module from /app/etc/modules/.xml

set <active>true</active> to <active>false</active>

2- If their is any dependent my sql table, Remove tables.

3- In Database, Remove resource config record for the respective module from core_resource.

4- Remove the <project_root>/var/cache folder

5- Refresh you home page or any other page.

And it should be Good.

1

Since you have installed it via ftp. you will have to remove it manually. You will have to remove each file manually.

To completely uninstall any extension, first start from disabling it. To disable the extension, please follow the next steps:

Edit app/etc/modules/Module_XXX.xml file . Change "true" to "false". Clear the cache.

At this point the extension is completely disabled and is not visible for Magento.

The next optional stage is removing the extension from the database:

If there is any dependent MySQL tables, drop them. Remove resource config record for the module from core_recource table in the database. Remove the /var/cache folder

The extension should be removed now.

OR

Try to Use MEFF - Magento Extension File Finder.I haven't used it.

OR

php script to remove an extension's files:

<?php
// used as base for the filenames below...
$extension_name = 'CO_Checkout';
 ?>
<style>
.red { color:#900; }
.gray { color:#999; }
.blue { color:#009; }
</style>
<pre><?php
// this is the input files list from unpacking the extension and running find command...
$filename = $extension_name.'_files_list.txt';

$tarFileList = $extension_name.'_tar_files.txt';
$tarball = $extension_name.'_pulled_from_production.tgz';
$span_red = 'class="red"'; $span_gray = 'class="gray"'; $span_blue = 'class="blue"';
$found = array();
$missing = array();
$handle = fopen($filename, "r");
if( $handle ) {
    while( ($line = fgets($handle)) !== false ) {
        $line=trim( $line, "/ .\n");
        $line=rtrim( $line );
        $line=str_replace( "\n", "", $line );
        $findme = $line; // dirname(__FILE__).'/'.$line;
        $command = "test -e $findme "; $output=""; $retval="";
        exec ( $command ,  &$output, &$retval  );
//      echo "$command returned $retval\n";
        if($retval > 0)
            $missing[]= $findme;
        else
            $found[]= $findme;
    }
} 
fclose($handle);

foreach( $missing as $file )
    echo "<span $span_red>$file</span>\n";
//foreach( $found as $file )
//  echo "<span $span_gray>$file</span>\n";

if( count( $missing ) > 0 )
    die( "Incomplete file list; ".count( $missing )." files not found!\nExiting before next stage.</pre>");

echo "Confirmed: ".count( $found )." files from original list are found.\n<span $span_gray>Attempting tar...</span>\n\n";

$_fileslist = implode( "\n", $found );
file_put_contents( $tarFileList, $_fileslist );

$command = "tar -czvf $tarball -T $tarFileList"; $output=""; $retval="";
exec ( $command ,  &$output, &$retval  );
if( $retval !== 0 )
    die( "$command <span $span_red>returned $retval</span>!\nExiting before next stage.</pre>");
else
    echo "$command <span $span_blue>returned $retval</span>\n\n";

// echo "\n\n".count( $output )."<b> files in output.</b>\n"; print_r( $output );

if( count( $found ) == count( $output ) )
    echo "Confirmed: ".count( $found )." files found and <span $span_blue>".count( $output )." files tar'd</span>.\n<span $span_gray>Deleting files from site now...</span>\n\n";
else
    die( "Wtf? ".count( $found )." != ".count( $output )."?!\n" );

$error=FALSE;
foreach( $found as $file_to_rm ){
    $command = "rm $file_to_rm"; $output=""; $retval="";
    exec ( $command ,  &$output, &$retval  );
    if( $retval !== 0 ) {
        echo "$command <span $span_red>returned $retval</span>!\n";
        $error = TRUE;
    } 
    else
        echo "<span $span_gray>$command returned $retval</span>\n";
}
echo "\n\n";

if( $error )
    echo "<span $span_red><b>There was an error!</b></span>\nCheck your site's functionality\n";
else
    echo "No errors, but better double check site's functions\n";

echo "\n\n<b>If something is broken,</b> run this command in the SSH quickly:\n\n";
echo "<h2>tar -xzvf $tarball</h2>\n";

?>
  • this is not true, there is a 95% chance that magento will pickup some left over files, best option is to delete database tables and remove folder in app/code/*/[Extension name] – MagenX Feb 14 '17 at 10:20
0

In magento whenever we install a new extension, there is one xml file which is created in var/package folder. Because of this xml file, we can see the modules listed in downloader section in magento. So if you are having your modules listed in downloader section from there you can remove them or if they are not listed then try to get those extensions xml file by installing them in a new magento and then copy the generated xml file from var/package to your old magento directory. Make sure you install the extension via magento connect manager to get the xml fil in var folder

0

To remove extension from website :

  1. Download again that extension's original files from official website.
  2. Compare with your website's files.
  3. Delete the files from your website based on the original files through ftp.
  4. After that clear the cache.
  • this will not work, he needs to wipe it out, not disable... – MagenX Mar 17 '17 at 9:59
  • @MagenX, yes thats y i explained the other way also bro. i edited my answer check once and plz think about vote. – Teja Bhagavan Kollepara Mar 17 '17 at 10:03
0

i was trying to delete extension this way:

yum install mlocate
updatedb
locate  -i --regex "bannerpopup"


/homedir/public_html/app/code/community/Magebuzz/Bannerpopup
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/Block
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/Helper
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/Model
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/controllers
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/etc
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/sql
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/Block/Adminhtml
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/Block/Bannerpopup.php
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/Block/Adminhtml/Bannerpopup
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/Block/Adminhtml/Bannerpopup.php
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/Block/Adminhtml/Bannerpopup/Edit
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/Block/Adminhtml/Bannerpopup/Edit.php
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/Block/Adminhtml/Bannerpopup/Grid.php
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/Block/Adminhtml/Bannerpopup/Renderer
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/Block/Adminhtml/Bannerpopup/Edit/Form.php
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/Block/Adminhtml/Bannerpopup/Edit/Tab
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/Block/Adminhtml/Bannerpopup/Edit/Tabs.php
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/Block/Adminhtml/Bannerpopup/Edit/Tab/Main.php
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/Block/Adminhtml/Bannerpopup/Renderer/Bannerimage.php
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/Helper/Data.php
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/Model/Bannerpopup.php
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/Model/Mysql4
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/Model/Session.php
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/Model/Status.php
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/Model/Wysiwyg
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/Model/Mysql4/Bannerpopup
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/Model/Mysql4/Bannerpopup.php
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/Model/Mysql4/Bannerpopup/Collection.php
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/Model/Wysiwyg/Config.php
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/controllers/Adminhtml
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/controllers/IndexController.php
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/controllers/Adminhtml/Bannerpopup
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/controllers/Adminhtml/Bannerpopup/BannerpopupController.php
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/etc/adminhtml.xml
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/etc/config.xml
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/etc/system.xml
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/sql/bannerpopup_setup
/homedir/public_html/app/code/community/Magebuzz/Bannerpopup/sql/bannerpopup_setup/mysql4-install-0.1.0.php
/homedir/public_html/app/design/adminhtml/default/default/layout/bannerpopup.xml
/homedir/public_html/app/design/frontend/base/default/layout/bannerpopup.xml
/homedir/public_html/app/design/frontend/base/default/template/bannerpopup
/homedir/public_html/app/design/frontend/base/default/template/bannerpopup/bannerpopup.phtml
/homedir/public_html/app/etc/modules/Magebuzz_Bannerpopup.xml
/homedir/public_html/app/locale/en_US/Magebuzz_Bannerpopup.csv
/homedir/public_html/media/bannerpopup
/homedir/public_html/media/bannerpopup/Untitled_design.jpg
/homedir/public_html/media/bannerpopup/mudanza-popup.png
/homedir/public_html/media/bannerpopup/programa_puntos.jpg
/homedir/public_html/media/media_original_images/bannerpopup
/homedir/public_html/media/media_original_images/bannerpopup/mudanza-popup.png

then also if extension have mysql file, then revert all mysql changes:

cat /homedir/public_html/app/code/community/Magebuzz/Bannerpopup/sql/bannerpopup_setup/mysql4-install-0.1.0.php




<?php
 /*
* @copyright   Copyright ( c ) 2013 www.magebuzz.com
*/
$installer = $this;
$installer->startSetup();
$installer->run("

DROP TABLE IF EXISTS {$this->getTable('bannerpopup')};
CREATE TABLE {$this->getTable('bannerpopup')} (
  `bannerpopup_id` int(11) unsigned NOT NULL auto_increment,
  `title` varchar(255) NOT NULL default '',
  `link` text NULL,
  `viewcounts` int(11) NOT NULL default '0',
  `showcounts` int(11) NOT NULL default '0',
  `filename` varchar(255) NOT NULL default '',
  `status` smallint(6) NOT NULL default '0',
  `created_time` datetime NULL,
  `update_time` datetime NULL,
  PRIMARY KEY (`bannerpopup_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
    ");
$installer->endSetup();

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.