Contextual Adminbar Color
Contextual Adminbar Color
Description
This plugins provides custom admin bar colors to differentiate environments (staging, preprod, production). It’s really easy to use and developer-friendly.
The plugin provides a settings screen which several options:
- choose between several color predefined schemes.
- use a favicon to better differentiate your environments in your browser’s tabs.
- add a custom message in your admin bar, like “Production website”, “staging version” or whatever your want.
- choose the user roles that will see the color scheme (other roles will see the default admin bar).
It also offers few PHP constants you can use in your wp-config.php file (see Frequently Asked Questions below).
Since WordPress Core will probably deprecate alternate admin color schemes in mid-term, this plugin is meant to be use by those who rely on colors to know is they are in staging, preproduction or production environment.
Last but not least, all provided color schemes are accessibility-ready!
Installation
- Activate the plugin.
- Good to Tools > Adminbar settings to configure the plugin.
- Save your changes and enjoy 🙂
Screenshots
Faq
Use CONTEXTUAL_ADMINBAR_COLOR to force color scheme.
Accepted values: blue, red, green, purple, orange and darkgray.
Example: define( 'CONTEXTUAL_ADMINBAR_COLOR', 'purple' );
Use CONTEXTUAL_ADMINBAR_MESSAGE to force your custom admin bar message to display.
Accepted values: any valid string.
Example: define( 'CONTEXTUAL_ADMINBAR_MESSAGE', 'This is the staging website' );
-
CONTEXTUAL_ADMINBAR_FAVICONto force a favicon.
Accepted values:0(don’t force a color based favicon) or1(force WordPress Admin to use the favicon that is related to your selected color scheme).
Example:define( 'CONTEXTUAL_ADMINBAR_FAVICON', 1 ); -
CONTEXTUAL_ADMINBAR_SETTINGSto remove the settings screen from WordPress Admin, and manage the plugin’s settings only within thewp-config.phpfile.
Accepted values:0(remove the settings screen) or1(keep it).
Example:define( 'CONTEXTUAL_ADMINBAR_SETTINGS', 0 )
Reviews
Très pratique !
By Jean-BriceM on January 8, 2025
Présent sur toutes mes sites en pre-prod ! 🙂
highly useful
By omeld on September 14, 2022
Just what I needed
By evaldash on September 3, 2021
Exactly what I was looking for
By martinjosef on February 5, 2021
Makes my life much better knowing exactly where I am
By Dirk Tornow (smings) on January 23, 2021
Simple and very usefull!
By Pedro Mendonça (pedromendonca) on February 5, 2020
Great !!!
By Cédric Chevillard (cedche99) on December 13, 2019
This is what I need
By Julio Potier (juliobox) on December 2, 2019
Changelog
0.3.1
- Adds option to switch back to default color scheme.
0.3
- Fixes security issues, thanks to the WordPress Plugin/Security team.
0.2
- Plugin initial version, now on WordPress.org!
0.1
- Plugin initial version, only released on GitHub.


