How to Run Compile Command Line in Magento 2

In this tutorial, we will discuss How to Run Compile Command Line in Command Line Series. They include multiple commands in bin/Magento.

Run Compile Command Line

Go to Magento admin root folder and show usage:

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

  setup:di:compile


Options:

  -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


Help:

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

Unlock Admin user

php bin/magento setup:di:compile

The Output of compilation :

Compilation was started.

Interception cache generation... 7/7 [============================] 100% 19 secs 280.0 MiB

Generated code and dependency injection configuration successfully.

If you are looking for Magento 2 Developers, visit Magento 2 Services.

Related Posts
  1. How To Add Configurable Product In Magento 2
  2. Setup Multiple Stores in Magento 2
  3. BENEFITS OF HAVING MAGENTO 2 UX
  4. Benefits of Magento 2 Improved Layered Navigation