{"id":117532,"date":"2020-02-20T06:27:14","date_gmt":"2020-02-20T06:27:14","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/environment-info\/"},"modified":"2026-10-02T19:27:59","modified_gmt":"2026-10-02T19:27:59","slug":"environment-info","status":"publish","type":"plugin","link":"https:\/\/mk.wordpress.org\/plugins\/environment-info\/","author":14867054,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.1.3","stable_tag":"1.1.3","tested":"7.1.2","requires":"5.0.0","requires_php":"","requires_plugins":null,"header_name":"Environment Info","header_author":"Palasthotel <webmaster@palasthotel.de>","header_description":"Admin bar label to quick peed on which environment you're on","assets_banners_color":"","last_updated":"2026-10-02 19:27:59","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/palasthotel.de\/","header_plugin_uri":"","header_author_uri":"https:\/\/palasthotel.de","rating":0,"author_block_rating":0,"active_installs":10,"downloads":1580,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.1.0":{"tag":"1.1.0","author":"EdwardBock","date":"2021-10-12 13:15:24","revision":2613055},"1.1.1":{"tag":"1.1.1","author":"EdwardBock","date":"2023-02-23 11:18:16","revision":2869931},"1.1.2":{"tag":"1.1.2","author":"palasthotel","date":"2026-08-03 14:57:49","revision":3633086},"1.1.3":{"tag":"1.1.3","author":"palasthotel","date":"2026-10-02 19:27:59","revision":3725380}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":2247328,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":2247328,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.1.0","1.1.1","1.1.2","1.1.3"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[1339,434,1641],"plugin_category":[],"plugin_contributors":[85158,274076,138992],"plugin_business_model":[],"class_list":["post-117532","plugin","type-plugin","status-publish","hentry","plugin_tags-admin-bar","plugin_tags-dashboard","plugin_tags-information","plugin_contributors-edwardbock","plugin_contributors-janaeggebrecht","plugin_contributors-palasthotel","plugin_committers-edwardbock","plugin_committers-palasthotel"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/environment-info\/assets\/icon-128x128.png?rev=2247328","icon_2x":"https:\/\/ps.w.org\/environment-info\/assets\/icon-256x256.png?rev=2247328","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Show environmental info on your admin bar so you will never accidentally edit production site contents instead of stage or the other way around.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Install the plugin from Plugins &gt; Add New, or upload <code>environment-info.zip<\/code> under Plugins &gt; Add New &gt; Upload Plugin<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<li>Describe your environments in <code>wp-config.php<\/code>, see below<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"how%20do%20i%20describe%20my%20environments%3F\"><h3>How do I describe my environments?<\/h3><\/dt>\n<dd><p>Define the constant <code>ENVIRONMENT_INFO_SETTINGS<\/code> in <code>wp-config.php<\/code>, with one entry per environment:<\/p>\n\n<pre><code>define( 'ENVIRONMENT_INFO_SETTINGS', [\n    [ 'path' =&gt; '\/var\/www\/staging', 'title' =&gt; 'Staging', 'background' =&gt; '#b45309', 'color' =&gt; 'white' ],\n    [ 'hostname' =&gt; 'web-prod-1', 'title' =&gt; 'Production', 'background' =&gt; '#b91c1c', 'color' =&gt; 'white' ],\n] );\n<\/code><\/pre>\n\n<p>Each entry needs a <code>title<\/code> and is recognised either by <code>hostname<\/code>, compared with the server's host name, or by <code>path<\/code>, which matches when it appears anywhere in the plugin's directory path. <code>background<\/code> and <code>color<\/code> take any CSS colour.<\/p><\/dd>\n<dt id=\"the%20admin%20bar%20says%20%22unknown%20server%22\"><h3>The admin bar says \"Unknown Server\"<\/h3><\/dt>\n<dd><p>Exactly one entry has to match. With none, or with more than one, the label reads \"Unknown Server\"; more than one match is also written to the error log. Tools &gt; Environment Info lists every entry, marks the active one and shows the current host name and path, so you can see why nothing matched.<\/p><\/dd>\n<dt id=\"who%20sees%20the%20label%3F\"><h3>Who sees the label?<\/h3><\/dt>\n<dd><p>Every logged-in user who sees the admin bar. The overview under Tools &gt; Environment Info requires the <code>manage_options<\/code> capability.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.1.3<\/h4>\n\n<p><strong>Bug Fixes<\/strong>\n* stop an empty path from matching every server (00ae461)<\/p>\n\n<h4>1.1.2<\/h4>\n\n<p><strong>Bug Fixes<\/strong>\n* point the admin bar at the info page and escape rendered output (ec0ed92)<\/p>\n\n<h4>1.1.1<\/h4>\n\n<ul>\n<li>Bugfix: Removed a fatal error caused by wrong hook<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Feature: Identify environment by hostname<\/li>\n<li>Feature: Tool page with overview of all defined environments<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Submitted to wordpress.org plugin repo version<\/li>\n<\/ul>","raw_excerpt":"Show environmental info on your admin bar.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/117532","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=117532"}],"author":[{"embeddable":true,"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/palasthotel"}],"wp:attachment":[{"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=117532"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=117532"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=117532"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=117532"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=117532"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=117532"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}