2

I would like disable all module of a particular vendor in a single command.

I know we have php bin/magento module:disable [Vendor_ModuleName] command but as far as I know it doesnot take wild cards like php bin/magento module:disable Foo_*.

I was wondering if they is way to do this in a single go ?

11

Ok so tried out some commands and seems like linux shell piping commands can help with this:

Disable all modules for a particular vendor name:

php bin/magento module:status | grep [VendorName] | grep -v List | grep -v None | grep -v -e '^$' | xargs php bin/magento module:disable -f

Example:

php bin/magento module:status | grep Foo_ | grep -v List | grep -v None | grep -v -e '^$'| xargs php bin/magento module:disable -f

Disable all custom modules except Magento's core modules:

php bin/magento module:status | grep -v Magento | grep -v List | grep -v None | grep -v -e '^$'| xargs php bin/magento module:disable -f

Hope this helps someone.

  • Some support for wildcards would be nice though (and logic) – snh_nl Apr 26 at 9:00

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.