layout | group | subgroup | title | menu_title | menu_order | menu_node | version | github_link | redirect_from |
---|---|---|---|---|---|---|---|---|---|
default |
config-guide |
03_Bootstrap |
About Magento modes |
About Magento modes |
3 |
2.0 |
config-guide/bootstrap/magento-modes.md |
/guides/v1.0/config-guide/bootstrap/magento-modes.html |
Mode name | Description |
---|---|
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.
|
developer | Intended for development only, this mode:
|
production | Intended for deployment on a production system. Exceptions are not displayed to the user, exceptions are written to logs only, and static view files are served from `pub/static` only. New or updated files are not written to the file system. |
To deploy the Magento application on more than one server or to optimize it for production, change to one of the other modes.
In default mode:
- Errors are logged to the file reports at server, and never shown to a user
- A symlink to a static view file is published to the
pub/static
directory for each requested file - Default mode is not optimized for a production environment, primarily because of the adverse performance impact of {% glossarytooltip 363662cb-73f1-4347-a15e-2d2adabeb0c2 %}static files{% endglossarytooltip %} being dynamically generated rather than materialized{:target="_blank"}. In other words, creating static files and caching them has a greater performance impact than generating them using the static files creation tool.
For more information, see Set the Magento mode.
You should run the Magento software in developer mode when you're extending or customizing it.In developer mode:
- A symlink to a static view file is published to the
pub/static
directory for each requested file - Uncaught exceptions display in the browser
- System logging in
var/report
is verbose - An {% glossarytooltip 53da11f1-d0b8-4a7e-b078-1e099462b409 %}exception{% endglossarytooltip %} is thrown in the error handler, rather than being logged
- An exception is thrown when an {% glossarytooltip c57aef7c-97b4-4b2b-a999-8001accef1fe %}event{% endglossarytooltip %} subscriber cannot be invoked
For more information, see Set the Magento mode.
You should run the Magento software in production mode when it's deployed to a production server. After optimizing the server environment (database, web server, and so on), you should run the static view files deployment tool to write static view files to the Magento `pub/static` directory.This improves performance because static files don't go through the fallback mechanism; instead, URLs for static files are created as needed.
In production mode:
- Static view files are not materialized, and URLs for them are composed on the fly without going through the fallback mechanism. (Static view files are served from {% glossarytooltip 0bc9c8bc-de1a-4a06-9c99-a89a29c30645 %}cache{% endglossarytooltip %} only.)
- Errors are logged to the file system and are never displayed to the user
To set a mode, see Set the Magento mode.
To generate static view files for production mode, see Deploy static view files