Magento 2 can be configured to run in 3 modes, Default, Developer and Production.
As its name implies, default mode is how Magento operates if no other mode is specified. Default mode enables you to deploy the Magento application on a single server without changing any settings. However, default mode is not as optimized for production as is production mode.
Enable Developer mode only when you are extending or customizing your Magento store.
In developer mode:
- Static view files are not cached; they are written to the Magento
pub/staticdirectory every time they’re called
- Uncaught exceptions display in the browser
- System logging in
- An exception is thrown in the error handler, rather than being logged
- An exception is thrown when an event subscriber cannot be invoked
Put your Magento store in Production mode after all development is done and store ready is open for end customers.
In production mode:
- Static view files are not materialized, and URLs for them are composed on the fly. Static view files are served from the cache only.
- Errors are logged to the file system and are never displayed to the user.
- You can enable and disable cache types only using the command line.
There is another mode in Magento 2 which is Maintenance mode and used when making any changes in live store front.