Magento 2 Modes

In Magento 2, there are three primary Magento 2 modes:

  1. Default Mode
  2. Developer Mode
  3. Production Mode

Default Mode

As the name describes, the Default mode is how Magento 2 works by Default. This modemode is not optimized for production so never use this on a live production site.

The Default mode has the following key features:

  1. Errors and Exceptions are never shown to the user. They are logged to var/reports directory at the server.
  2. Symlinks to the static view files are published to the pub/static.
  3. It hides custom X-Magento-* HTTP request and response headers
  4. This mode is not optimized for the production environment because the static view files are first materialized and then cached.

Developer Mode

This mode is recommended for developers and is the recommended mode for the development. You should set the Magento 2 Developer mode when you need to customize and extend the platform’s functionalities. This mode is slower on the front end and the website admin.

Features of the Developer:

  1. Uncaught exceptions and errors displayed in the web browser.
  2. Enhanced debugging.
  3. The exception is thrown in the web browser when an event subscriber cannot be invoked.
  4. The exception appears in the error handler rather than being logged.
  5. Automatic code compilation.

Production Mode

When your store is ready to go and has been deployed to a production server, you should set the Magento 2 in production mode. After that, you should also deploy the static view files to the Magento 2 pub/static directory because this improves the performance of the store.


  1. Static view files are not materialized. They are only served from the cache.
  2. Errors are never displayed to the user. Instead, they are logged to the filesystem.

Setting Magento Modes

To change or set the Magento mode, you can use the following CLI command in your SSH Terminal:

php bin/magento deploy:mode:set {mode} [-s|--skip-compilation] 

In the above command, {mode} is the required field. It can be either production or developer.

–skip-compilation is the optional parameter used to skip code compilation when you set the Magento 2 to production mode. After changing the mode, you might want to clean the cache as well by running the following command:

php bin/magento cache:clean 

Show Current Mode

The easiest way of checking what mode is active right now, run the following CLI command:

php bin/magento deploy:mode:show 

A message, similar to the following line will be displayed: Current application mode: production


I hope now you will have a better understanding of the Magento 2 modes, as well as how to change the mode and see which mode your Magento 2 store is using. Using the different modes for Magento 2 offers new ways for development and enhance the performance and functionality of the platform.