{"id":367385,"date":"2026-09-20T22:53:44","date_gmt":"2026-09-20T22:53:44","guid":{"rendered":"https:\/\/en-au.wordpress.org\/plugins\/staging-indicator\/"},"modified":"2026-09-21T04:20:52","modified_gmt":"2026-09-21T04:20:52","slug":"stagebar-staging-environment-indicator","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/stagebar-staging-environment-indicator\/","author":13305219,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.0","stable_tag":"1.0.0","tested":"7.1.2","requires":"5.5","requires_php":"7.4","requires_plugins":null,"header_name":"StageBar \u2013 Staging Environment Indicator","header_author":"DeeperLook","header_description":"Colours the admin bar and shows a LOCAL \/ DEV \/ STAGING \/ LIVE badge so you always know which environment you are editing.","assets_banners_color":"4d5b31","last_updated":"2026-09-21 04:20:52","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/deeperlook.com.au\/?utm_source=stagebar&utm_medium=plugin-header&utm_campaign=wordpress-org","rating":0,"author_block_rating":0,"active_installs":0,"downloads":60,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"DeeperLook","date":"2026-09-21 04:20:52","revision":3704815}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3704693,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3704693,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256},"icon.svg":{"filename":"icon.svg","revision":3704693,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3704693,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3704693,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3704693,"resolution":"1","location":"assets","locale":"","width":1280,"height":500},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3704693,"resolution":"2","location":"assets","locale":"","width":1280,"height":500},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3704693,"resolution":"3","location":"assets","locale":"","width":1037,"height":1201}},"screenshots":{"1":"The STAGING badge and amber admin bar in the dashboard.","2":"The LIVE badge and red admin bar on the front end.","3":"The settings screen: what the site is resolving to and why, your own address lists, and a colour for each badge."}},"plugin_section":[],"plugin_tags":[1339,734,7318,23063,19979],"plugin_category":[],"plugin_contributors":[281763],"plugin_business_model":[],"class_list":["post-367385","plugin","type-plugin","status-publish","hentry","plugin_tags-admin-bar","plugin_tags-development","plugin_tags-environment","plugin_tags-production","plugin_tags-staging","plugin_contributors-deeperlook","plugin_committers-deeperlook"],"banners":{"banner":"https:\/\/ps.w.org\/stagebar-staging-environment-indicator\/assets\/banner-772x250.png?rev=3704693","banner_2x":"https:\/\/ps.w.org\/stagebar-staging-environment-indicator\/assets\/banner-1544x500.png?rev=3704693","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/stagebar-staging-environment-indicator\/assets\/icon.svg?rev=3704693","icon":"https:\/\/ps.w.org\/stagebar-staging-environment-indicator\/assets\/icon.svg?rev=3704693","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/stagebar-staging-environment-indicator\/assets\/screenshot-1.png?rev=3704693","caption":"The STAGING badge and amber admin bar in the dashboard."},{"src":"https:\/\/ps.w.org\/stagebar-staging-environment-indicator\/assets\/screenshot-2.png?rev=3704693","caption":"The LIVE badge and red admin bar on the front end."},{"src":"https:\/\/ps.w.org\/stagebar-staging-environment-indicator\/assets\/screenshot-3.png?rev=3704693","caption":"The settings screen: what the site is resolving to and why, your own address lists, and a colour for each badge."}],"raw_content":"<!--section=description-->\n<p>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?<\/p>\n\n<p>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:<\/p>\n\n<ul>\n<li><strong>LIVE<\/strong> - red<\/li>\n<li><strong>STAGING<\/strong> - amber<\/li>\n<li><strong>DEV<\/strong> - green<\/li>\n<li><strong>LOCAL<\/strong> - purple<\/li>\n<\/ul>\n\n<p>Activate it and it works. There is nothing you have to configure first.<\/p>\n\n<p><strong>When it is not sure, it says LIVE<\/strong><\/p>\n\n<p>This is the idea the whole plugin is built around, and it is worth a minute of your time.<\/p>\n\n<p>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.<\/p>\n\n<p>That principle shows up in real decisions:<\/p>\n\n<ul>\n<li>It matches whole parts of an address, never fragments. A genuine business at <code>dev-shop.com.au<\/code> or <code>stage-lighting.com.au<\/code> is shown as LIVE, because \"dev\" and \"stage\" there are part of a company name, not a signal.<\/li>\n<li>It will not assume a whole hosting domain is staging. Managed hosts including WP Engine, Kinsta, Cloudways, Flywheel, Pressable and Elementor Hosting all serve <strong>real, live<\/strong> sites on their own domains before a custom domain is pointed at them. Their staging URLs are still recognised, because those contain a <code>staging<\/code> or <code>dev<\/code> part.<\/li>\n<\/ul>\n\n<p>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.<\/p>\n\n<p><strong>When you need to correct it<\/strong><\/p>\n\n<p>Some staging sites do not look like staging sites from the outside. When that happens, go to <strong>Settings \u2192 StageBar<\/strong> and tell it about the site. Type an address, press Enter, and it becomes a tag you can remove again with a click.<\/p>\n\n<p>You can be as broad or as precise as you like:<\/p>\n\n<ul>\n<li>A full address such as <code>staging.example.com<\/code> matches that one site.<\/li>\n<li>A domain such as <code>example.com<\/code> matches it and everything underneath it.<\/li>\n<li>A single word such as <code>uat<\/code> matches any address using it as a name of its own, like <code>uat.example.com<\/code>.<\/li>\n<\/ul>\n\n<p>The first list, <strong>Live<\/strong>, 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.<\/p>\n\n<p>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.<\/p>\n\n<p><strong>The settings screen explains itself<\/strong><\/p>\n\n<p>At the top it tells you which environment the site is on, the exact address it checked, and <em>why<\/em> it decided that - your own list, a built-in rule, or a setting in <code>wp-config.php<\/code>. No guessing about what the plugin is thinking.<\/p>\n\n<p>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.<\/p>\n\n<p><strong>What it does not do<\/strong><\/p>\n\n<p>Just as important as what it does:<\/p>\n\n<ul>\n<li>It does not stop, block or slow down anything you do. It is a label, not a lock.<\/li>\n<li>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.<\/li>\n<li>It never contacts an external server, for any reason.<\/li>\n<li>It creates no database tables and stores nothing until you save the settings screen. Uninstalling removes the single row it may have created.<\/li>\n<\/ul>\n\n<p><strong>The most reliable setup, if you have access<\/strong><\/p>\n\n<p>Everything above is the plugin working out the answer for itself. If you can edit <code>wp-config.php<\/code>, you can simply tell WordPress the answer instead, and there is nothing left to guess:<\/p>\n\n<pre><code>define( 'WP_ENVIRONMENT_TYPE', 'staging' );\n<\/code><\/pre>\n\n<p>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.<\/p>\n\n<p><strong>For developers<\/strong><\/p>\n\n<p>Order of precedence: <code>WP_ENVIRONMENT_TYPE<\/code>, then your saved addresses, then the built-in rules, then production. Filters run last and override all of it.<\/p>\n\n<ul>\n<li><code>stagebar_environment<\/code> - override the resolved environment (<code>local<\/code>, <code>development<\/code>, <code>staging<\/code>, <code>production<\/code>). Any other value is ignored and treated as <code>production<\/code>.<\/li>\n<li><code>stagebar_hostname_rules<\/code> - add or change the built-in hostname patterns. An array of <code>environment =&gt; array of PCRE patterns<\/code>; unknown keys and non-string patterns are ignored.<\/li>\n<li><code>stagebar_style<\/code> - change the label or colours for an environment. Colours must be 3 or 6 digit hex strings including the leading <code>#<\/code>; anything else falls back to the resolved default.<\/li>\n<li><code>stagebar_colour_admin_bar<\/code> - return <code>false<\/code> to keep the default admin bar colour and show only the badge.<\/li>\n<\/ul>\n\n<p>The plugin adds a <code>stagebar-{environment}<\/code> class to the <code>&lt;body&gt;<\/code> element in the admin, and on the front end when the admin bar is showing.<\/p>\n\n<p>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 <code>home_url()<\/code> - the site's own recorded address - and never from the <code>Host<\/code> request header, which a proxy can rewrite.<\/p>\n\n<p>Force the environment where you cannot edit <code>wp-config.php<\/code>:<\/p>\n\n<pre><code>add_filter( 'stagebar_environment', function () { return 'staging'; } );\n<\/code><\/pre>\n\n<p>Built and maintained by <a href=\"https:\/\/deeperlook.com.au\/\">DeeperLook<\/a>, a WordPress web design agency in Australia.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Install and activate it from <strong>Plugins \u2192 Add New<\/strong>, or upload the <code>stagebar-staging-environment-indicator<\/code> folder to <code>\/wp-content\/plugins\/<\/code>.<\/li>\n<li>That is the whole setup. Look at your admin bar.<\/li>\n<\/ol>\n\n<p>If a site is labelled wrongly, go to <strong>Settings \u2192 StageBar<\/strong> and add its address to the right list.<\/p>\n\n<p>If you have access to <code>wp-config.php<\/code>, this line removes all guesswork on that site:<\/p>\n\n<pre><code>define( 'WP_ENVIRONMENT_TYPE', 'staging' );\n<\/code><\/pre>\n\n<!--section=faq-->\n<dl>\n<dt id=\"do%20i%20have%20to%20set%20anything%20up%3F\"><h3>Do I have to set anything up?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"will%20my%20visitors%20see%20any%20of%20this%3F\"><h3>Will my visitors see any of this?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"will%20it%20slow%20my%20site%20down%3F\"><h3>Will it slow my site down?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"it%20says%20live%20on%20my%20staging%20site.%20why%3F\"><h3>It says LIVE on my staging site. Why?<\/h3><\/dt>\n<dd><p>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 <strong>Settings \u2192 StageBar<\/strong>, or set <code>WP_ENVIRONMENT_TYPE<\/code> in <code>wp-config.php<\/code>.<\/p><\/dd>\n<dt id=\"it%20says%20staging%20on%20a%20site%20that%20is%20actually%20live.%20how%20do%20i%20fix%20it%3F\"><h3>It says STAGING on a site that is actually live. How do I fix it?<\/h3><\/dt>\n<dd><p>Add the site's full address to the <strong>Live<\/strong> list, the first one under <em>Your sites<\/em>. 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.<\/p><\/dd>\n<dt id=\"my%20host%20gives%20every%20site%20a%20temporary%20address.%20why%20is%20it%20not%20detected%3F\"><h3>My host gives every site a temporary address. Why is it not detected?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"my%20staging%20site%20is%20a%20copy%20of%20the%20live%20site%20and%20the%20url%20was%20never%20changed.%20will%20it%20be%20detected%3F\"><h3>My staging site is a copy of the live site and the URL was never changed. Will it be detected?<\/h3><\/dt>\n<dd><p>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 <code>WP_ENVIRONMENT_TYPE<\/code> on the copy, or add its address on the settings screen.<\/p><\/dd>\n<dt id=\"i%20put%20the%20same%20address%20in%20two%20lists.%20which%20one%20wins%3F\"><h3>I put the same address in two lists. Which one wins?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"is%20there%20a%20limit%20to%20how%20many%20addresses%20i%20can%20add%3F\"><h3>Is there a limit to how many addresses I can add?<\/h3><\/dt>\n<dd><p>Twenty per list, which is far more than most sites need.<\/p><\/dd>\n<dt id=\"can%20i%20keep%20the%20badge%20but%20not%20colour%20the%20whole%20admin%20bar%3F\"><h3>Can I keep the badge but not colour the whole admin bar?<\/h3><\/dt>\n<dd><p>Yes, there is a checkbox for it on the settings screen. In code: <code>add_filter( 'stagebar_colour_admin_bar', '__return_false' );<\/code><\/p><\/dd>\n<dt id=\"where%20does%20the%20badge%20appear%3F\"><h3>Where does the badge appear?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20wordpress%20multisite%3F\"><h3>Does it work with WordPress multisite?<\/h3><\/dt>\n<dd><p>Yes. Activate it network-wide or per site. Each site is judged on its own address and keeps its own settings.<\/p><\/dd>\n<dt id=\"what%20happens%20if%20i%20delete%20the%20plugin%3F\"><h3>What happens if I delete the plugin?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Know at a glance which site you are editing. The admin bar changes colour and shows a LIVE, STAGING, DEV or LOCAL badge.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/367385","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=367385"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/deeperlook"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=367385"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=367385"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=367385"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=367385"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=367385"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=367385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}