Skip to content

Instantly share code, notes, and snippets.

View davidangel's full-sized avatar
😇
👍

David Angel davidangel

😇
👍
View GitHub Profile
@ryanjbonnell
ryanjbonnell / wp-config.php
Created November 7, 2013 16:43
WordPress Configuration for Multiple Environments
<?php
// Define Environment Variables
$environment = new stdClass();
$environment->local = '/wp-config-local.php';
$environment->staging = '/wp-config-staging.php';
$environment->testing = '/wp-config-testing.php';
// Dynamically Set Environment Constants
define( 'WP_ENV_LOCAL', file_exists( ABSPATH . $environment->local ) );
define( 'WP_ENV_STAGING', file_exists( ABSPATH . $environment->staging ) );