Shopping cart

How to Run Compile Command Line in Magento 2

In this tutorial, we will talk about How to Run Compile Command Line in Command Line Series. As you know, from Magento 2, they add many commands in bin/magento. This may difficult to get approach this, let me explain more detail about How to Run Compile Command Line.

How to Run Compile Command Line

Go to Magento admin root folder and show usage:

php bin/magento setup:di:compile --help

  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

  Generates DI configuration and all missing classes that can be auto-generated

Syntax to Unlock Admin user

php bin/magento setup:di:compile

Output of compilation :

Compilation was started.
Interception cache generation... 7/7 [============================] 100% 19 secs 280.0 MiB
Generated code and dependency injection configuration successfully.

Meet Mageplaza at Meet Magento Asia

Enjoyed the tutorial? Spread it to your friends!


Comments for How to Run Compile Command Line in Magento 2

Please leave comments if you have any questions, feedbacks.

Module Development

We recommend:

You also may like these Magento 2 Extensions

One Step Checkout

111 reviews

Layered Navigation

59 reviews

Gift Card

6 reviews

Reward Points

4 reviews


12 reviews

Shop By Brand

16 reviews