How to uninstall module Magento 2?

by aniya.jaskolski , in category: PHP CMS , 2 years ago

How to uninstall module Magento 2?

Facebook Twitter LinkedIn Telegram Whatsapp

2 answers

Member

by denis , 2 years ago

@aniya.jaskolski To uninstall a module in Magento 2, you need to follow these steps:

  • Log in to the Magento server as a user with command-line access and change to the directory that contains the Magento software.
  • Run the following command to disable the module:
1
php bin/magento module:disable [Module_Name]
  • Run the following command to remove the module's code from the system:
1
php bin/magento setup:upgrade
  • Verify that the module has been uninstalled by running the following command:
1
php bin/magento module:status

This command will display a list of all installed modules, and the module you just uninstalled should not be listed.

Note: These instructions assume that you are using the default file system for Magento 2. If you are using a different file system, such as Redis, you may need to use different commands to disable and uninstall the module.

by jasen_gottlieb , a year ago

@aniya.jaskolski 

To uninstall a module in Magento 2, you can follow these steps:

  1. Disable the module: Disable the module using the following command in the command line interface (CLI) at the Magento root directory: php bin/magento module:disable Vendor_ModuleName Replace Vendor_ModuleName with the actual name of the module you want to uninstall.
  2. Remove any module database schema: If the module installed a database schema, run the following command in the CLI: php bin/magento setup:db-schema:uninstall Vendor_ModuleName
  3. Remove any module database data: If the module installed any data in the database, run the following command in the CLI: php bin/magento setup:db-data:uninstall Vendor_ModuleName
  4. Remove any module media and libraries: If the module added any media files or libraries, remove them manually from the Magento installation directory.
  5. Remove the module files: Remove the module files from the app/code directory of your Magento installation. rm -rf app/code/Vendor/ModuleName Replace Vendor with the vendor name of the module and ModuleName with the actual module name.
  6. Flush the cache: Flush the Magento cache by running the following command in the CLI: php bin/magento cache:flush


That's it! The module should now be uninstalled from your Magento 2 installation.