roots/wp-stage-switcher
WordPress plugin that allows you to switch between different environments from the admin bar
Installs: 81 097
Dependents: 1
Suggesters: 0
Stars: 218
Watchers: 27
Forks: 28
Open Issues: 0
Type:wordpress-plugin
Requires
- php: >=5.4.0
- composer/installers: ~1.0
- jwage/purl: ^0.0.6
README
A WordPress plugin that allows you to switch between different environments from the admin bar.
Requirements
You'll need to have ENVIRONMENTS
and WP_ENV
defined in your WordPress config.
The ENVIRONMENTS
constant must be a serialized array of 'environment' => 'url'
elements:
$envs = [ 'development' => 'http://example.dev', 'staging' => 'http://staging.example.com', 'production' => 'http://example.com' ]; define('ENVIRONMENTS', serialize($envs));
WP_ENV
must be defined as the current environment:
define('WP_ENV', 'development');
If you use Bedrock, WP_ENV
is already defined in the config.
Installation
This plugin must be installed via Composer. Add wp-stage-switcher to your project's dependencies:
composer require roots/wp-stage-switcher 2.0.0
Or manually add it to your composer.json
:
"require": { "php": ">=5.4.0", "wordpress": "4.4.2", "roots/wp-stage-switcher": "2.0.0" }
Support
Use the Roots Discourse to ask questions and get support.