How to set Developer mode in Magento 2?

Magento 2 added a command for switching Magento modes from Developer to Production and vice versa in order to increase security in website.

When changing to developer mode, Magento 2 clears contents of directories below:






But .htaccess files and files specifying the version of static content in pub/static are not removed.

Let’s start setting Developer mode for Magento 2!

Step 1: Display current mode

You should run the command as the Magento file system owner. Use following command:

magento deploy:mode:show

If command above doesn’t work, use following command under Magento root folder:

php bin/magento deploy:mode:set developer

Step 2: Change mode

When changing to Developer mode, you need delete generated classes and Object Manager entitles in order to protect errors.

Then us following command to change to Developer mode:

magento deploy:mode:set {mode} [-s| --skip-compilation]

In case it doesn’t work, use this command:

php bin/magento deploy:mode:set {mode} [-s| --skip-compilation]

The guideline above is quite easy so we think all of you can perform without difficulty.

Thanks for reading!