0

I know why we use bin/magento setup:upgrade and bin/magento setup:static-content:deploy

It is recommended on many blogs and forums that we need to execute bin/magento setup:di:compile after upgrade command.

It will be great if anyone can tell why do we use this command, what is the purpose behind it?

bin/magento setup:di:compile

1

2 Answers 2

2

setup:di:compile => Generates DI (Dependency injection) configuration and all missing classes that can be auto-generated

Trick: You can type php bin/magento, you'll see all commands with their purpose.

enter image description here

0
0

The setup:di:compile command is an integral part of Magento’s 2 command-line interface (CLI). Its primary purpose is to compile the dependency injection (DI) configuration files

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.