Last updated 20 March 2014. Created on 12 May 2013.
Edited by Jon Pugh, cedewey, Alan D., e0ipso. Log in to edit this page.

Note that the Environment Indicator (envindicator) project was a complete rewrite of Environmental Indicator. This project has been incorporated back into Environment Indicator (environment_indicator) as part of the 7.x-2.x branch.

Key differences with the 7.x-1.x release:

  • You can configure all your indicators from one place.
  • You can position your indicator to not to interfere with your design.
  • You can control permissions per environment. This way you can show the indicator for anonymous users in all the environments except for production.
  • You can export your configurations to code and include them in GIT.
  • It can be used on dynamically generated environments.
  • Your site builders won't need to access your settings.php.
  • It's integrated with the features module.
  • It's integrated with the Toolbar module.
  • Integration with Admin menu module.
  • You have an environment switcher to open the current page in a different environment.
  • You have a favicon indicator that will help you notice which tab is the production environment without ever opening the tab.

There is also a super cool thing called Environment Indicator Variables, which will allow you to override the values of variables per environment. Find out more about it here.


Watch the video. Video in Spanish.


  1. Install your module as usual.
  2. Go to: admin/config/development/environment-indicator and add an environment by:
    1. Giving it a name.
    2. Setting a regular expression that will match the hostname: you can just paste in your hostname.
    3. Select a color.
    4. Select the position.

OR The settings for the Environment Indicator, such as the text to display and the color can be overridden for each of your specific environments using the configuration UI or in the site's settings.php file. You can also export this configuration to code, this allows you to customize the indicator for each environment without needing to make any changes in the database. This means that the Environment Indicator will always display correctly when moving your site from development to staging to production. If you choose to detect your environment using settings.php, then all configuration variables can be overridden in settings.php, but the most common three are:


// Whether the Environment Indicator should use the settings.php variables for the indicator. On your production environment, you should probably set this to FALSE.
$conf['environment_indicator_overwrite'] = TRUE;

// The text that will be displayed on the indicator. 
$conf['environment_indicator_overwritten_name'] = 'Staging';

// Valid css colors for the text and background of the admin toolbar and environment indicator.
$conf['environment_indicator_overwritten_color'] = '#ff5555';
$conf['environment_indicator_overwritten_text_color'] = '#ffffff';

// Where your indicator may appear. Allowed values are "top" and "bottom".
$conf['environment_indicator_overwritten_position'] = 'top';

// A boolean value indicating whether the Environment Indicator should be visible at all times, fixed at the top/bottom of the screen.
$conf['environment_indicator_overwritten_fixed'] = FALSE;


$conf['environment_indicator_enabled'] = FALSE;
$conf['environment_indicator_text'] = 'Staging';
$conf['environment_indicator_color'] = '#ff5555';


Looking for support? Visit the forums, or join #drupal-support in IRC.


zoheir.nabavi’s picture

On your production environment, you should probably set this to FALSE.

Why is that?

bret.miller’s picture

I suspect that most organizations wouldn't want "Production Environment" or "Live Site" displayed publicly. I plan to leave it enabled and define my "default_environment" as the production site so public won't see the indicator, but anyone who logs in (just admins and contributors here) will see it. I think that's a better way than disabling it altogether. Of course the option to do that is only available in the 2.x versions so it wouldn't be available on Drupal 6.

zoheir.nabavi’s picture

I kind of do understand your point. But if you are overriding these in 'settings.php' file (assuming different colors for each environment) you can simply keep them on your production and make sure only certain roles see the indicator. I am just not sure if I understand the purpose of turning the override off on prod