WP Environment Ribbon
WordPress plugin: slim colored ribbon at top of wp-admin based on WP_ENVIRONMENT_TYPE. Zero config.
by moxieworks · github.com/moxieworks/wp-environment-ribbon · website
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/moxieworks/wp-environment-ribbon/releases/download/v1.0.0/wp-environment-ribbon.zipReadme
=== WP Environment Ribbon === Contributors: moxieworks Tags: environment, admin, staging, development, ribbon, local Requires at least: 6.4 Tested up to: 6.6 Requires PHP: 8.0 Stable tag: 1.0.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html
Displays a slim colored ribbon at the top of wp-admin based on WP_ENVIRONMENT_TYPE. Zero config.
== Description ==
WP Environment Ribbon reads WordPress's built-in WP_ENVIRONMENT_TYPE constant and injects a thin
colored banner at the very top of every wp-admin screen — above the toolbar — so you always know
which environment you're working in.
Color coding:
- Local / Development — blue
- Staging — amber
- Production — red (opt-in, off by default)
Key facts:
- Zero configuration required — works out of the box.
- Pure CSS injection via
admin_head. No JavaScript, no database tables, no REST endpoints. - Silent fail: if
WP_ENVIRONMENT_TYPEis not defined or is"production", the ribbon is hidden by default. Enable the production ribbon under Settings > General. - No data leaves your server — no analytics, no telemetry, no external requests.
Setting WP_ENVIRONMENT_TYPE (if you haven't already):
Add this to wp-config.php:
define( 'WP_ENVIRONMENT_TYPE', 'staging' );
Accepted values: local, development, staging, production.
== Installation ==
- Upload the
wp-environment-ribbonfolder to/wp-content/plugins/. - Activate the plugin through the Plugins screen in WordPress.
- Done. The ribbon appears automatically based on
WP_ENVIRONMENT_TYPE.
To enable the ribbon on production sites, go to Settings > General and tick Show ribbon on production.
== Frequently Asked Questions ==
= I don't see a ribbon. =
Make sure WP_ENVIRONMENT_TYPE is defined in wp-config.php and is set to local,
development, or staging. For production, enable the opt-in in Settings > General.
= Will this affect the front end? =
No. The ribbon is injected only via the admin_head hook, which fires exclusively inside wp-admin.
= Does it work with WooCommerce / Elementor / [other plugin]? =
Yes. The ribbon is a single fixed <div> with a high z-index; it does not interfere with page
layout or other plugins.
= What if WP_ENVIRONMENT_TYPE is not set? =
The plugin treats an undefined constant the same as "production" — the ribbon is hidden unless
you explicitly opt in under Settings > General.
= Is there a network admin ribbon? =
Not in v1.0.0. Multisite network admin support is planned for v1.1.0.
== Screenshots ==
- Staging ribbon (amber) shown above the WordPress toolbar.
- Local ribbon (blue) in a development environment.
- Production ribbon (red) enabled via Settings > General opt-in.
== Changelog ==
= 1.0.0 =
- Initial release.
== Upgrade Notice ==
= 1.0.0 = Initial release — no upgrade steps required.
Read the full README on GitHub →
Releases
| Tag | Published | Asset | Downloads |
|---|---|---|---|
| v1.0.0 | Aug 1, 2026 | wp-environment-ribbon.zip | 0 |