Shopping cart

How to Set Production Mode in Magento 2

In this tutorial, we will talk about How to Set Production Mode in Magento 2 via 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 it.

How to set Product Mode

Show current Magento 2 Mode

php bin/magento deploy:mode:show

Result:

$ php bin/magento deploy:mode:show
Current application mode: default. (Note: Environment variables may override this value.)

Currently, we are in default mode. We can set to Production mode

Set Production Mode

You are a merchant or just want to change to production mode, just run the following command line in Magento root folder:

php bin/magento deploy:mode:set production

Result:

$ php bin/magento deploy:mode:set production
Enabled production mode.

Congrats! Now your store is running in production mode.





Enjoyed the tutorial? Spread it to your friends!

magento-2-module-development
command
line
cli
console
indexer
reindex

Sam Thomas
Sam Thomas
CEO and Founder of Mageplaza. Pursueing a simple and healthy lifestyle. A friend, a husband and a dad of two children, a trainer and a wanna-be influencer. He is a big fan of sports and travel, also.

Comments for How to Set Production Mode in Magento 2

Please leave comments if you have any questions, feedbacks.

Module Development

We recommend: