First, will be a good idea to check the current MODE:

The main idea is to have this (environment) variable MAGE_MODE set to one of this values:

  • Default
  • Developer
  • Production


To change the MODE in Magento for the moment there are 3 ways:

  1. From CLI  (you’ll be 100% sure it changed)
  2. Using the .htaccess file:
  3. Through your WEB Server (Apache or Nginx)
    • This is an example for Apache , added in vhost file:
    • Nginx example

Alternatively you also can set (on UNIX systems), the environment variable can also be set by exporting it into a shell before restarting the service:


NOTE: You can NOT go back to Default mode (in theory) once you changed it to production or developer but if you really want to go back then you could open this file:

and edit the following line: