group | subgroup | title | menu_title | menu_order | redirect_from |
---|---|---|---|---|---|
php-developer-guide |
03_Build |
Enable or disable your component |
Enable or disable your component |
8000 |
/guides/v2.0/extension-dev-guide/enable-module.html |
After you have built the component and are ready to enable it in your Magento environment, do the following:
- Disable the {% glossarytooltip 0bc9c8bc-de1a-4a06-9c99-a89a29c30645 %}cache{% endglossarytooltip %} under
System->Cache Management
. - Enter the following at the command line:
bin/magento module:enable --clear-static-content Component_Name bin/magento setup:upgrade
where
Component_Name
is the name of the component you are enabling. - Check under
Stores->Configuration->Advanced->Advanced
that the component is present.
The general order of operations for `setup:upgrade` is:
- Schema install/upgrade.
- Schema post-upgrade— handles any additional updates. These recurring upgrades occur independently and regardless of any changes to the schema.
- Data install/upgrade — installs the data. Taken from
setup/InstallData.php
.
To disable a component, enter the following at the command line:
bin/magento module:disable --clear-static-content Component_Name
For more on enabling and disabling components, see [enable or disable modules]({{ page.baseurl }}/install-gde/install/cli/install-cli-subcommands-enable.html#instgde-cli-subcommands-enable-disable).