Skip to content

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.

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