One can use magento module:status
to create lists of extensions. By wrapping this into $()
it is executed first. It filters out the extensions that we want by using grep and adds a negative grep to be certain we dont match unwanted stuff.
How to enable all modules from Vendor Foo_
The base command to enable all modules from Foo_
is like this
php bin/magento module:enable $(php bin/magento module:status | grep '^Foo_' | grep -v '^List|^None|^Magento|^$')
This will enable all Modules that start with the label Foo_
.
Changing you filter
You can replace Foo with the Vendor name of your choice if the Modules label start with this string. Or you can remove the caret ^
and it will match anywhere in the string. Like this grep 'Foo' will match any extension that hass the string Foo
in the label. Be carefull with this. A good way to test it is to first execute php bin/magento module:status | grep '^Foo_' | grep -v '^List|^None|^Magento|^$'
and see the list that it returns: is this what you want?
How to disable all modules from Vendor Foo_
The same can be made to disable all modules from Foo_
php bin/magento module:disable $(php bin/magento module:status | grep '^Foo_' | grep -v '^List|^None|^Magento|^$')
How to disable all modules from 1 certain extension called Foo_Coolstuff
The same can be made to disable all modules and submodules from Foo_Coolstuff
php bin/magento module:disable $(php bin/magento module:status | grep '^Foo_Cool' | grep -v '^List|^None|^Magento|^$')
The above will enable all modules where the label starts with ^Foo_Cool
. Another option can be to add ^Foo_Core
then the command will become grep '^Foo_Cool|^Foo_Core'