There was a problem loading the comments.

How to enable Magento 2 production mode

Support Portal  »  General  »  Viewing Article

  Print

When you install Magento 2, it comes in a special mode called "default", the default mode is how Magento 2 operates when no mode is set - however, the default mode isn't really optimized for production usage, it generally causes the Magento 2 cronjobs to run 6 times slower than production mode.

To enable Production mode, you have to log onto SSH and go to your Magento 2 installation directory.

When you're in the directory, you have to execute the "magento"-binary.

First to check which mode is currently in use, you can run something like:

php bin/magento deploy:mode:show

If you want to enable production mode you can run:

php bin/magento deploy:mode:set production

Please be aware, that the above command can take 10-60 seconds to run. Your shop will go into maintenance-mode meanwhile this happens.

The performance benefits in production mode is rather big. It results in an overall faster website, but also consumes a lot less resources for your hosting account.


Share via
Did you find this article useful?  

Related Articles


Comments

Add Comment

Replying to  

CAPTCHA
© PerfGrid