Magento mode switch

The Magento application has three modes of operation that make it convenient for you to deploy it in a development or production environment.

The two modes you hear the most about are developer mode and production mode. Aptly named, these modes are intended for development and production use, respectively.

Magento Commerce (Cloud) supports production mode only.

Not only do these modes enable you to change Magento application behavior, switching between them using the magento deploy:mode:set command also sets file system permissions automatically.

To switch modes:

  1. Log in as, or switch to, the Magento file system owner.
  2. Change to the <your Magento install dir>/bin directory.
  3. Use the magento deploy:mode:set command as summarized in the following table.

    Mode Command File system permissions
    developer magento deploy:mode:set developer

    Directories: 770 (owner and group have full control, all others have no access)

    Files: 660 (owner and group have write access, all others have no access)

    production magento deploy:mode:set production [--keep-generated]

    Directories: 750 (owner has full control, group has read and execute access, all others have no access)

    Files: 640 (owner has write access, group has read-only access, all others have no access)