PHP code example of roots / wp-stage-switcher
1. Go to this page and download the library: Download roots/wp-stage-switcher library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
roots / wp-stage-switcher example snippets
$envs = [
'development' => 'http://example.dev',
'staging' => 'http://staging.example.com',
'production' => 'http://example.com'
];
define('ENVIRONMENTS', serialize($envs));
define('WP_ENV', 'development');