O'Reilly logo

Magento 2 - Build World-Class online stores by Jonathan Bownds, Bret Williams, Vladimir Kerkhoff, Ray Bogman, Fernando J. Miguel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required