Magento-modes

Different Modes in Magento 2

One major change that differentiate Magento 2 from Magento 1 is the introduction of development Modes. 

What are Magento modes?

In Magento there are three modes of operation for deployment in a development or production environment:  DefaultDeveloper and Production modes. The fastest one is production and recommed to run a live magento website in this mode . Default and Developer modes are used for debugging purposes and not recommended to use for a live site.

And one more mode for maintenance: Intended to prevent access to a site while it is being updated or reconfigured, this mode

MODE NAMEDESCRIPTION
default

Enables you to deploy the Magento application on a single server without changing any settings. However, default mode is not optimized for production.

To deploy the Magento application on more than one server or to optimize it for production, change to one of the other modes.

  • Static view file caching is enabled
  • Exceptions are not displayed to the user; instead, exceptions are written to log files.
  • Hides custom X-Magento-* HTTP request and response headers
developer

Intended for development only, this mode:

  • Disables static view file caching
  • Provides verbose logging
  • Enables automatic code compilation
  • Enables enhanced debugging
  • Shows custom X-Magento-* HTTP request and response headers
  • Results in the slowest performance
  • Shows errors on the frontend
production

Intended for deployment on a production system, this mode:

  • Does not show exceptions to the user (exceptions are written to logs only).
  • Serves static view files from cache only.
  • Prevents automatic code file compilation. New or updated files are not written to the file system.
  • Does not allow you to enable or disable cache types in Admin.
maintenance

Intended to prevent access to a site while it is being updated or reconfigured, this mode:

  • Redirects site visitors to a default Service Temporarily Unavailable page.
  • When the site is in maintenance mode, the var/ directory contains the .maintenance.flag file.
  • You can configure maintenance mode to allow visitor access from a specified list of IP addresses.

NOTE: Adobe Commerce on cloud infrastructure supports only the production and maintenance modes.