How to uninstall and remove a Magento 2 extension ( manual )

Samsul Hoque
2
Depending on the installation method, you need to uninstall the extension manually or via composer. Both methods are explained below.



 Manual Uninstall

Step 1: Connect via SSH to the root of your magento installation (this is the folder that has the app folder in it) and check the list of all modules including their enable / disable status

php bin/magento module:status


Step 2:  Disable the module by executing below commands:

php bin/magento module:disable <ExtensionProvider_ExtensionName> --clear-static-content
php bin/magento setup:upgrade

Step 3: Remove extension files

cd app/code/<ExtensionProvider>/
rm -rf <ExtensionName>
Step 4: Remove the record with module <ExtensionProvider_ExtensionName> from the table setup_module

Step 5: Remove the line with <ExtensionProvider_ExtensionName> from app/etc/config.php


!Note: If you are using more extensions from the same provider make sure not to remove the shared extension, most providers use a shared extension or dependancy pack as a base for all their extensions.



Example: Let assume you are using WeltPixel Hello World Extension and you want to uninstall it and remove all associated files:

php bin/magento module:disable Hello_World --clear-static-content
php bin/magento setup:upgrade
cd app/code/Hello/
rm -rf World



Post a Comment

2Comments
Post a Comment