Stratus Magento 2 Guides - Manually Uninstalling an Extension or Module
NOTE: Before starting any modification that may affect your store, always backup your store and database first. Preferably, you will be performing this action on a Development environment before attempting it on a Production environment.
To remove an extension/module manually:
-
Log into the environment via SSH.
-
Go to the root of the Magento 2 installation and remove the folder,
app/code/<Vendor>/<Module>
. -
Run
n98-magerun2 db:console
to access the database. -
Drop the module tabels from the database:
DELETE FROM core_config_data WHERE path LIKE ‘
_ /%'; DELETE FROM setup_module WHERE module=' _ ’;
(Hint: make sure the database does not have a prefix before running anything.)
- Remove the module/extension
_ from app/etc/config.php
.
Uninstalling via Composer
If the extension/module had been installed using composer, the procedure, of course, is a lot easier. To recap, from the root of the Magento 2 installation, run:
php bin/magento module:uninstall --backup-code --backup-db -r -c <Vendor>_<Module>
After Uninstalling an Extension
After you have uninstalled an extension or module, you need to run the following command via SSH:
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:clean && php bin/magento cache:flush
php bin/magento indexer:reindex && redis-cli -h redis flushall
NOTE: It is not possible to remove or uninstall default Magento modules if they are not installed with Composer. Many of these are sued as integration modules. However, if you need to cease using a default module, you can simply set it to “disable”.
Feedback
Was this page helpful?
Glad to hear it! Have any more feedback? Please share it here.
Sorry to hear that. Have any more feedback? Please share it here.