1. Home
  2. Magento 2 Guides
  3. Set Magento 2 modes

Set Magento 2 modes

Magento 2 has several modes that amount to different config states which either enhance performance or enable various development tools. Please read the dev docs on Magento 2 modes along with this page.

Default mode

This mode is halfway between dev 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 you refresh this content via the Magento 2 cache, static files, and compilation.

Developer mode

Performance in developer will be much worse, but this is expected as Magento 2 will have more verbose logging and debugging enabled; this should always be on during active development. Then switch to production for performance testing.

Changing the mode

Much like static files, changing the mode involves running a Magento command. However, due to the same PHP pathing issues that affect static files, the correct PHP binary must be called to run the Magento command and deploy static files.  The following command will change the mode.

On MageMojo servers always preface your Magento 2 commands or scripts with php70 for maximum performance and compatibility.

Updated on July 22, 2017

Was this article helpful?

Related Articles