Edit in GitHubLog an issue

Enable or disable a component

After you have built the component and are ready to enable it in your environment, do the following:

  1. Disable the cache under System->Cache Management.

  2. Enter the following in the command line:

    Copied to your clipboard
    bin/magento module:enable --clear-static-content Component_Name
    Copied to your clipboard
    bin/magento setup:upgrade
    Copied to your clipboard
    bin/magento cache:clean

    Where Component_Name is the name of the component you are enabling.

  3. Check that the component is enabled:

    Copied to your clipboard
    bin/magento module:status <extension-name>

    An extension name uses the format: <VendorName>_<ComponentName>.

    Sample response:

    Copied to your clipboard
    Module is enabled

Order of operations#

The general order of operations for setup:upgrade is:

  1. Schema install/upgrade.
  2. Schema post-upgrade— handles any additional updates. These recurring upgrades occur independently and regardless of any changes to the schema.
  3. Data install/upgrade — installs the data. Taken from setup/InstallData.php.

Disable a component#

To disable a component, enter the following at the command line:

Copied to your clipboard
bin/magento module:disable --clear-static-content Component_Name

For more on enabling and disabling components, see enable or disable modules.

Was this helpful?
  • Privacy
  • Terms of Use
  • Do not sell my personal information
  • AdChoices
Copyright © 2022 Adobe. All rights reserved.