Skip to content

Development Config

Deployment Modes

Magento 2 out of the box comes with three deployments the installation can be set to.

In order of performance (best to worst).

  • Production
  • Default
  • Developer

Official Documentation

Production Mode

As the name suggests, you should be using this deploy mode in production at all times or you will incur significant performance penalties.

Whilst it is not stated in the Magento 2 documentation, production mode is useful for local development when you want to preview the performance of the store before changes are pushed live.

If you intend to develop in production mode, it is important you regularly clear the caches and consider disabling the full page cache unless you explicitly want to check for issues with the full page cache and your changes.

It is strongly recommended that you use developer mode locally, without this you will miss important errors thrown on the frontend or on the command line if something is wrong.

Default Mode

A middle of the road type of mode as it is neither for development or production. It is not recommended to use this mode in development or production.

Developer Mode

Only intended for developers, incurs a slight performance penalty due to static content being generated on the first request. Developer mode should be used at all times when working locally so that errors are presented to you and caught as soon as possible.

Caches

There are many different caches in vanilla Magento 2

Cache List

When developing, caches will help speed up the Magento performance but changes may not be shown until the caches are cleaned or disabled. One notable cache is the full page cache, this will cache the entire page output using either the built in cache of Varnish.

Unless you are testing the full page cache with your changes, you should disable the full page cache and stop Nginx/Apache from proxying the requests through Varnish.