PHPackages                             alexisprovost/development-sidebar - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. alexisprovost/development-sidebar

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

alexisprovost/development-sidebar
=================================

Sidebar that tells you when you're on a dev version of your site and shows information about the development server.

v6.0.3(1mo ago)079—0%MITPHPPHP &gt;=8.2CI passing

Since May 1Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/alexisprovost/development-sidebar)[ Packagist](https://packagist.org/packages/alexisprovost/development-sidebar)[ RSS](/packages/alexisprovost-development-sidebar/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (5)DependenciesVersions (5)Used By (0)

development-sidebar
===================

[](#development-sidebar)

[![CI](https://github.com/alexisprovost/development-sidebar/actions/workflows/ci.yml/badge.svg)](https://github.com/alexisprovost/development-sidebar/actions/workflows/ci.yml)[![Latest Version](https://camo.githubusercontent.com/398afd180f3c29b98ea701533ec5dfee1f85c64097d05ead6a057a3c908597e5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c6578697370726f766f73742f646576656c6f706d656e742d736964656261722e737667)](https://packagist.org/packages/alexisprovost/development-sidebar)[![PHP Version](https://camo.githubusercontent.com/426175b3c0ecafe298ddf87249622dc51e4b5cf583db92fd05f38f80e424de7b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f616c6578697370726f766f73742f646576656c6f706d656e742d736964656261722e737667)](https://packagist.org/packages/alexisprovost/development-sidebar)[![Downloads](https://camo.githubusercontent.com/d3ace0b467aa89b3c7b531531a4b622a283ab5974dd87ca4fad5b4fbba9fe308/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616c6578697370726f766f73742f646576656c6f706d656e742d736964656261722e737667)](https://packagist.org/packages/alexisprovost/development-sidebar)[![License](https://camo.githubusercontent.com/b38fae9afcb58b58ab090956cdf3c8224103e2bd8694829b50f249cb9732b336/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f616c6578697370726f766f73742f646576656c6f706d656e742d736964656261722e737667)](LICENSE)

A tiny PHP sidebar that pins the env name, platform, hostname, and build version to the edge of every page on dev / staging / infra. One file. PHP 8.2+. No dependencies.

[![sidebar](https://camo.githubusercontent.com/0579ae96b22c2a3938de55baae394f1bb8c62b9376112a984981ede9c93870a2/68747470733a2f2f696d672e7373686f72742e6e65742f692f4c714a332e706e67)](https://camo.githubusercontent.com/0579ae96b22c2a3938de55baae394f1bb8c62b9376112a984981ede9c93870a2/68747470733a2f2f696d672e7373686f72742e6e65742f692f4c714a332e706e67)

Install
-------

[](#install)

The bar shows whenever `sidebar.php` is loaded. To keep it off prod, simply don't load it on prod servers — your apache / nginx / php-fpm config decides that.

### Apache (`auto_append_file`)

[](#apache-auto_append_file)

```
# .htaccess on dev / staging / infra only
php_value auto_append_file "/var/www/sidebar.php"
```

### nginx + php-fpm

[](#nginx--php-fpm)

The cleanest pattern across nginx, php-fpm, and shared hosts is a tiny loader file that decides at request time whether to render based on an env var. This keeps your nginx and php-fpm config identical across hosts; the env var (set by systemd, the container, your hosting panel, etc.) flips the bar on or off.

Drop a file like this next to `sidebar.php`:

```
