Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
bin/magento setup:di:compile

The follwing commands are usually executed for each Magento deployment.

Excerpt
  • Open command prompt (CLI)
  • Navigate to Magento 2 root directory and run the following commands:

    Upgrade Magento extension(s)

    Panel
    bgColorblack
    titleBGColorwhite
    languagepowershell
    themeMidnight
    title*nix command
    bin/magento setup:upgrade

    Re-compile Magento files:

    Panel
    bgColorblack
    titleBGColorwhite
    languagepowershell
    themeMidnight
    title*nix command
    Code Block
    bin/magento setup:upgrade
    bin/magento setup:di:compile
    bin/magento indexer:reindex

    Re-deploy static content

    Panel
    bgColorblack
    titleBGColorwhite
    languagebash
    themeMidnight
    title*nix command
    bin/magento
    Code Block
    rm -rf pub/static/frontend/ pub/static/deployed_version.txt  pub/static/adminhtml/
    bin/magento setup:static-content:
    deploy 
    deploy -f

    Clear / Clean Magento cache

    1. Details can be found on Manage the cache Magento DevDocs

    Rebuild Magento indexes:

    Panel
    bgColorblack
    titleBGColorwhite
    languagebash
    themeMidnight
    title*nix command
    bin/magento indexer:reindex
    NOTE: For more details about installing custom modules check http://devdocs.magento.com/guides/v2.0/
    If you face any issues, try running following command:  PanelbgColorblacktitleBGColorwhitelanguagebashthemeMidnighttitle*nix command

    Code Block
    bin/magento cache:clean

    Last but not least, disable the Magento maintenance mode

    Code Block
    bin/magento maintenance:disable

    Note

    If you run into any issues, try executing the following command and try again

    rm -rf var/generation/* generated/*

    When go though the all steps again