Magento 2 – Install via CLI but Exclude Some Core Modules

installationmagento2.2module

I'm installing Magento 2.2 via command line using

php bin/magento setup:install –backend-frontname="my-admin-value" –db-host=my.db.host –db-name=dbname –db-user=dbuser –db-password=dbpass –base-url="http://example.com" –language=en_US –timezone="Europe/Bucharest" –currency="EUR" –use-secure=1 –base-url-secure="https://example.com/" –admin-user=adminUser –admin-password=AdminPass –admin-email="me@example.com" –admin-firstname=John –admin-lastname=Doe –use-rewrites=1

And it works fine, but now I want to install it and skip the at least 2 core modules because I don't need them. Let's say they are Magento_Bundle and Magento_BundleImportExport.
(Ignore the fact that there might be dependent module on these. I don't care for now. Let's say I can disable the modules when installing via UI wizard).
How can I do that? Is it even possible? Is there a parameter I need to pass to the command?
I've tried running the command with -h but nothing comes up related to modules.

Best Answer

Check the output of bin/magento help setup:install. There are arguments for modules to enable or disable during installation:

--enable-modules[=ENABLE-MODULES]     List of comma-separated module names. That must be included during installation. Available magic param "all".
--disable-modules[=DISABLE-MODULES]   List of comma-separated module names. That must be avoided during installation. Available magic param "all".
Related Topic