Title: StageBar – Staging Environment Indicator
Author: DeeperLook
Published: <strong>September 20, 2026</strong>
Last modified: September 21, 2026

---

Search plugins

![](https://ps.w.org/stagebar-staging-environment-indicator/assets/banner-772x250.
png?rev=3704693)

![](https://ps.w.org/stagebar-staging-environment-indicator/assets/icon.svg?rev=
3704693)

# StageBar – Staging Environment Indicator

 By [DeeperLook](https://profiles.wordpress.org/deeperlook/)

[Download](https://downloads.wordpress.org/plugin/stagebar-staging-environment-indicator.1.0.0.zip)

 * [Details](https://wordpress.org/plugins/stagebar-staging-environment-indicator/#description)
 * [Reviews](https://wordpress.org/plugins/stagebar-staging-environment-indicator/#reviews)
 *  [Installation](https://wordpress.org/plugins/stagebar-staging-environment-indicator/#installation)
 * [Development](https://wordpress.org/plugins/stagebar-staging-environment-indicator/#developers)

 [Support](https://wordpress.org/support/plugin/stagebar-staging-environment-indicator/)

## Description

You have two tabs open that look identical. You make the change, you hit update,
and only then do you glance at the address bar. Was that staging, or was that the
live site?

StageBar answers that question before you start typing, not after. The WordPress
admin bar changes colour and shows a badge, so where you are is the first thing 
you see on every screen:

 * **LIVE** – red
 * **STAGING** – amber
 * **DEV** – green
 * **LOCAL** – purple

Activate it and it works. There is nothing you have to configure first.

**When it is not sure, it says LIVE**

This is the idea the whole plugin is built around, and it is worth a minute of your
time.

Telling you a staging site is LIVE is a nuisance. Telling you a live site is STAGING
is the exact accident the plugin exists to prevent, because you would trust it and
start making changes. So when it is not certain, it says LIVE.

That principle shows up in real decisions:

 * It matches whole parts of an address, never fragments. A genuine business at `
   dev-shop.com.au` or `stage-lighting.com.au` is shown as LIVE, because “dev” and“
   stage” there are part of a company name, not a signal.
 * It will not assume a whole hosting domain is staging. Managed hosts including
   WP Engine, Kinsta, Cloudways, Flywheel, Pressable and Elementor Hosting all serve**
   real, live** sites on their own domains before a custom domain is pointed at 
   them. Their staging URLs are still recognised, because those contain a `staging`
   or `dev` part.

So if it says LIVE, treat it as live. If it says anything else, something specific
told it so – and the settings screen will tell you exactly what.

**When you need to correct it**

Some staging sites do not look like staging sites from the outside. When that happens,
go to **Settings  StageBar** and tell it about the site. Type an address, press 
Enter, and it becomes a tag you can remove again with a click.

You can be as broad or as precise as you like:

 * A full address such as `staging.example.com` matches that one site.
 * A domain such as `example.com` matches it and everything underneath it.
 * A single word such as `uat` matches any address using it as a name of its own,
   like `uat.example.com`.

The first list, **Live**, is there for the rarer case of a real site being labelled
wrongly. Put that site’s full address in it and no other entry can override it.

If two of your entries could both apply to a site, the more exact one wins – a full
address beats a domain, and a domain beats a single word – so being specific always
does what you expect. The screen points out overlaps as you add them.

**The settings screen explains itself**

At the top it tells you which environment the site is on, the exact address it checked,
and _why_ it decided that – your own list, a built-in rule, or a setting in `wp-
config.php`. No guessing about what the plugin is thinking.

You can also choose a colour for each environment, from five suggested shades or
any hex value you like. The text colour is worked out from the background for you,
so a badge can never end up unreadable. Each badge preview updates as you pick, 
and if you change the colour for the environment this site is currently in, the 
real admin bar at the top of the page updates with it – before you save anything.

**What it does not do**

Just as important as what it does:

 * It does not stop, block or slow down anything you do. It is a label, not a lock.
 * It does not change your content, your theme, or what visitors see. Logged-out
   visitors get nothing at all – not even a hidden marker in the page.
 * It never contacts an external server, for any reason.
 * It creates no database tables and stores nothing until you save the settings 
   screen. Uninstalling removes the single row it may have created.

**The most reliable setup, if you have access**

Everything above is the plugin working out the answer for itself. If you can edit`
wp-config.php`, you can simply tell WordPress the answer instead, and there is nothing
left to guess:

    ```
    define( 'WP_ENVIRONMENT_TYPE', 'staging' );
    ```

This is a standard WordPress setting, not something this plugin invented, and other
plugins understand it too. When it is set, StageBar uses it and ignores everything
else.

**For developers**

Order of precedence: `WP_ENVIRONMENT_TYPE`, then your saved addresses, then the 
built-in rules, then production. Filters run last and override all of it.

 * `stagebar_environment` – override the resolved environment (`local`, `development`,`
   staging`, `production`). Any other value is ignored and treated as `production`.
 * `stagebar_hostname_rules` – add or change the built-in hostname patterns. An 
   array of `environment => array of PCRE patterns`; unknown keys and non-string
   patterns are ignored.
 * `stagebar_style` – change the label or colours for an environment. Colours must
   be 3 or 6 digit hex strings including the leading `#`; anything else falls back
   to the resolved default.
 * `stagebar_colour_admin_bar` – return `false` to keep the default admin bar colour
   and show only the badge.

The plugin adds a `stagebar-{environment}` class to the `<body>` element in the 
admin, and on the front end when the admin bar is showing.

Addresses you save are matched as plain text, never compiled as regular expressions,
and every stored value is validated again each time it is read. The environment 
is worked out from `home_url()` – the site’s own recorded address – and never from
the `Host` request header, which a proxy can rewrite.

Force the environment where you cannot edit `wp-config.php`:

    ```
    add_filter( 'stagebar_environment', function () { return 'staging'; } );
    ```

Built and maintained by [DeeperLook](https://deeperlook.com.au/), a WordPress web
design agency in Australia.

## Screenshots

[⌊The STAGING badge and amber admin bar in the dashboard.⌉⌊The STAGING badge and
amber admin bar in the dashboard.⌉[

The STAGING badge and amber admin bar in the dashboard.

[⌊The LIVE badge and red admin bar on the front end.⌉⌊The LIVE badge and red admin
bar on the front end.⌉[

The LIVE badge and red admin bar on the front end.

[⌊The settings screen: what the site is resolving to and why, your own address lists,
and a colour for each badge.⌉⌊The settings screen: what the site is resolving to
and why, your own address lists, and a colour for each badge.⌉[

The settings screen: what the site is resolving to and why, your own address lists,
and a colour for each badge.

## Installation

 1. Install and activate it from **Plugins  Add New**, or upload the `stagebar-staging-
    environment-indicator` folder to `/wp-content/plugins/`.
 2. That is the whole setup. Look at your admin bar.

If a site is labelled wrongly, go to **Settings  StageBar** and add its address 
to the right list.

If you have access to `wp-config.php`, this line removes all guesswork on that site:

    ```
    define( 'WP_ENVIRONMENT_TYPE', 'staging' );
    ```

## FAQ

### Do I have to set anything up?

No. Activate it and look at your admin bar. Everything on the settings screen is
there for correcting the rare case it gets wrong, not for getting started.

### Will my visitors see any of this?

No. It only appears for logged-in users who can already see the WordPress admin 
bar. Logged-out visitors get nothing – not the badge, not a colour, and not a hidden
marker in the page code.

### Will it slow my site down?

No. On a page where the admin bar is not being shown, the plugin does nothing at
all – it does not even read its own settings. When the bar is shown it adds a few
lines of CSS. The only JavaScript it has anywhere is on its own settings screen,
and that page works without it too. The settings live in a single option WordPress
already loads, so there are no extra database queries.

### It says LIVE on my staging site. Why?

Its address does not look like a staging address to the built-in rules, and when
the plugin is unsure it says LIVE on purpose – it would rather under-warn you than
tell you a live site is safe to break. Add the address under **Settings  StageBar**,
or set `WP_ENVIRONMENT_TYPE` in `wp-config.php`.

### It says STAGING on a site that is actually live. How do I fix it?

Add the site’s full address to the **Live** list, the first one under _Your sites_.
Entered in full, it cannot be overridden by anything else you have saved. Please
also report it in the support forum, so the built-in rule can be corrected for everyone.

### My host gives every site a temporary address. Why is it not detected?

Because most of those addresses are also used for real, live sites that have not
been pointed at a custom domain yet. Treating them all as staging would be the dangerous
mistake, so the plugin does not. Add your own address on the settings screen and
it will be recognised from then on.

### My staging site is a copy of the live site and the URL was never changed. Will it be detected?

No, and this is worth understanding. The plugin reads the address the site records
for itself, which on that copy is still the live address. It will show LIVE. Set`
WP_ENVIRONMENT_TYPE` on the copy, or add its address on the settings screen.

### I put the same address in two lists. Which one wins?

The one nearer the top of the page. The lists are checked in the order they appear:
Live, then Staging, then Development, then Local. You are warned before you save,
and afterwards the address is kept only in the list that won, so what you see always
matches what actually happens.

### Is there a limit to how many addresses I can add?

Twenty per list, which is far more than most sites need.

### Can I keep the badge but not colour the whole admin bar?

Yes, there is a checkbox for it on the settings screen. In code: `add_filter( 'stagebar_colour_admin_bar','
__return_false' );`

### Where does the badge appear?

Anywhere WordPress shows the admin bar: the dashboard, admin screens, and the front
end while you are logged in. Two things hide the bar itself, and the badge with 
it – the block editor’s full-screen mode, which is on by default and can be turned
off from its options menu, and some page builders inside their own editing screens.

### Does it work with WordPress multisite?

Yes. Activate it network-wide or per site. Each site is judged on its own address
and keeps its own settings.

### What happens if I delete the plugin?

The single option it may have saved is deleted with it. It creates no tables, no
post meta and no scheduled tasks, so nothing is left behind.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“StageBar – Staging Environment Indicator” is open source software. The following
people have contributed to this plugin.

Contributors

 *   [ DeeperLook ](https://profiles.wordpress.org/deeperlook/)

[Translate “StageBar – Staging Environment Indicator” into your language.](https://translate.wordpress.org/projects/wp-plugins/stagebar-staging-environment-indicator)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/stagebar-staging-environment-indicator/),
check out the [SVN repository](https://plugins.svn.wordpress.org/stagebar-staging-environment-indicator/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/stagebar-staging-environment-indicator/)
by [RSS](https://plugins.trac.wordpress.org/log/stagebar-staging-environment-indicator/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.0.0

 * Initial release.

## Meta

 *  Version **1.0.0**
 *  Last updated **2 days ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 5.5 or higher **
 *  Tested up to **7.1.2**
 *  PHP version ** 7.4 or higher **
 * Tags
 * [admin bar](https://wordpress.org/plugins/tags/admin-bar/)[development](https://wordpress.org/plugins/tags/development/)
   [environment](https://wordpress.org/plugins/tags/environment/)[production](https://wordpress.org/plugins/tags/production/)
   [staging](https://wordpress.org/plugins/tags/staging/)
 *  [Advanced View](https://wordpress.org/plugins/stagebar-staging-environment-indicator/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/stagebar-staging-environment-indicator/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/stagebar-staging-environment-indicator/reviews/)

## Contributors

 *   [ DeeperLook ](https://profiles.wordpress.org/deeperlook/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/stagebar-staging-environment-indicator/)