virtualMachinemagento

Understand and configure Magento modes

Magento works in different modes. The Bitnami Magento Stack enables “default” mode. These are the modes available:

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

  • Developer: Intended for development only. It disables static view file caching, enables enhanced debugging and verbose loggind, which results in a slower performance.

  • 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 cache only. New or updated files are not written to the file system.

Find more details about modes in Magento’s official documentation.

In order to display the current mode, run the following command:

$ sudo magento-cli deploy:mode:show

A message similar to the following will appear:

Current application mode: default.

To change to another mode, run this command replacing MODE with the “default”, “developer” or “production”

$ sudo magento-cli deploy:mode:set MODE

Here’s an example that sets Magento to production mode:

$ sudo magento-cli deploy:mode:set production

A message similar to the following will appear:

Enabled maintenance mode
Starting compilation
Last modification December 21, 2022