Stratus Magento 2 Guides - Set Magento 2 modes

Magento 2 has several modes that amount to different configuration states which either enhance performance or enable various development tools.

Please read the development documentation on Magento 2 modes for in-depth information.

  • Default mode

    This mode is “halfway” between development and production. Static files are enabled, but compilation is not.

  • Production mode

    All the caching and compilation features are enabled for performance. Updates to your site theme or other content may not appear without re-deploying this mode. Caching will be used for all requests which are why updates are ignored until this content is refreshed via the Magento 2 cache, static files, and compilation.

  • Developer mode

    Performance in developer will be significantly less, but this is expected as Magento 2 will have more verbose logging and debugging enabled, which should always be on during active development. Switch to production mode for performance testing.

Changing the mode

Much like static files, changing the mode involves running a Magento command:

php bin/magento deploy:mode:set production
#for default/dev replace production with default or developer

 


Last modified January 1, 0001