Managing Magento 2 set mode (MAGE_MODE)

Magento 2 comes with a new feature set called MAGE_MODE. This option gives you the configuration to run Magento in either developer, default, or production mode.

This feature is very important during development and product phases. It gives a developer the tool to debug or created optimized caches for high performance needs.

By default, the default mode is set.

The following table describes the modes in which we can run Magento:

Mode name

Description

default

When no given mode is given, this is explicitly set and has the following benefits:

  • Static view file caching is enabled
  • Enables automatic code compilation (code optimization)
  • Exceptions are written to the log files.
  • Hides the custom X-Magento-* HTTP response ...

Get Magento 2 - Build World-Class online stores now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.