This is a customized Wordpress wp-config.php that allows loading of custom config files for specific environments. The supplemental config files follow the naming convention of wp-config-{environment}.php
.
The purpose of this approach is to eliminate code changes when moving between environments (local, dev, stage, production, etc). The environments are fully customizable and based on programatically inspecting the $_SERVER['SERVER_NAME']
superglobal.
Usage is as simple as looking opening up the wp-config.php
and modifying the $environments
array to reflect your environments
$environments = array(
'local' => array('.local', 'local.example.com'),
'development' => array('dev.example.com', 'dev.', '.dev'),
'staging' => 'stage.example.com',
);
bold
#titre1
##titre2