Visually differentiate testing and production environment in WordPress
1 min read

Visually differentiate testing and production environment in WordPress

Plugin: Contextual Admin Bar Colors

When working with different environments in WordPress (testing, staging, production etc.) it's easy to confuse them.

One easy way to is to use different admin bar colors, one way is the plugin Contextual Admin Bar Colors by Jb Audras.

You can simply add the desired color in your wp-config.php or the environmental configuration of bedrock, if you happen to use that.

I add the following to my config/environment/development.php in bedrock:

/* Contextual Adminbar Color */

define( 'CONTEXTUAL_ADMINBAR_COLOR', 'blue' );
define( 'CONTEXTUAL_ADMINBAR_MESSAGE', 'Dev Site' );

Plugin: WordPress Stage Switcher

The WordPress Stage Switcher plugin adds the name of your environment and the option to quickly switch to your other environments from the admin bar.

The image is taken from the WordPress Stage Switcher Github page.

In order for this plugin to work you add the environments in your WordPress configuration file, I use bedrocks config/application.php (since it applies to all environments).