Commands to set developer or production mode in Magento 2

Enable Developer mode

When we have to develop any module for Magento 2, we have to set Magento in developer mode. For enabling developer mode use following steps so that you can set your developer mode enable

  • Go to your Magento root directory (where your Magento is installed)
  • Execute the following command:

php bin/Magento deploy:mode:set developer

Now your Magento is set to developer mode and you are free to check the upcoming errors while developing your module.

Enable production mode

When your site is ready and you have checked the proper functioning of all the modules then you have to set your Magento to production mode so that the site load fast and your client enjoys hassle free shopping. To enable production mode follow these steps:

  • Go to your Magento root directory (where your Magento is installed)
  • Execute the following command from the terminal:

php bin/Magento deploy:mode:set production­

Leave a Reply

Your email address will not be published. Required fields are marked *