Getting Your Bearings: Environment Indicator

I always thought the Environment Indicator module was kind of a silly little module but ended up throwing it on a site used to demo change migration and I found it surprisingly helpful. It's super easy to get running and could save you from a self-inflicted meltdown. Here's the shortest route to get it going.


Install the Environment Indicator by adding it's files to the modules directory of your site, just like any other Drupal module. Once you install the Environment Indicator, it appears as a red bar along the left side of each page per the default configurations. Also, be sure to set permissions to allow the desired users of the site to see the Environment Indicator. Generally you'll want to provide this to administrative type users only.

Pick a Scheme

Having the Environment Indicator doesn't do you much good if it's not stupid obvious which site you're working on. I like to go with a red, yellow, green stoplight type scheme.

  •  RED  for development environments.
  •  YELLOW  (orange) for the staging environment.
  •  GREEN  for the production environment.

Handling Multiple Configurations

Dealing with separate configurations for each environment can get tricky if you're managing configuration with Features. The easiest method I have come up with is to use the default configuration for local or dev environments and to capture those configurations into Features.

Configurations can then be adjusted on staging and production environments by adding configurations into the site's settings.php file.

['environment_indicator_text'] = 'PRODUCTION SERVER';
$conf['environment_indicator_color'] = 'green';