Basics

setup:upgrade

1
$ bin/magento setup:upgrade [--keep-generated] [--convert-old-scripts [CONVERT-OLD-SCRIPTS]] [--safe-mode [SAFE-MODE]] [--data-restore [DATA-RESTORE]] [--dry-run [DRY-RUN]] [--magento-init-params MAGENTO-INIT-PARAMS]
Upgrades the Magento application, DB data, and schema.
Upgrade allows Magento to check for new modules and register them.
Modules are not listed in app/etc/modules any more.
It will also apply data/schema changes like sys:setup:run (Magento 1).

setup:di:compile

1
$ bin/magento setup:di:compile
Generates DI configuration and all missing classes that can be auto-generated

Magento commands

You will need to run these commands every time you install a new module

1
2
3
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy en_GB en_US