Stage Switcher #4 in Admin & Dashboard
WordPress plugin that allows you to switch between different environments from the admin bar
★ 377stars
493kcomposer installs
42forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/roots/wp-stage-switcher/archive/refs/heads/master.zipAlso on Packagist as roots/wp-stage-switcher:
composer require roots/wp-stage-switcherFrom the readme
WordPress Stage Switcher
A WordPress plugin that allows you to switch between different environments from the admin bar.
Support us
Roots is an independent open source org, supported only by developers like you. Your sponsorship funds WP Packages and the entire Roots ecosystem, and keeps them independent. Support us by purchasing Radicle or sponsoring us on GitHub — sponsors get access to our private Discord.
Requirements
You'll need to have ENVIRONMENTS and WPENV defined in your WordPress config.
The ENVIRONMENTS constant must be an array of 'environment' = 'url' elements:
WPENV must be defined as the current environment:
If you use Bedrock, WPENV is already defined in the config.
Installation
This plugin must be installed via Composer. Add wp-stage-switcher to your project's dependencies:
Filters
bedrock/stageswitchercolors
Customize the background colors for each environment in the admin bar menu. Returns an array of 'environment' = 'color' pairs.
Default colors:
Example usage:
bedrock/stageswitchervisibility
Control who can see the stage switcher in the admin bar. Defaults to issuperadmin().
Example usage:
Community
Keep track of development and community ne
Read the full README on GitHub →