Skip to content

Instantly share code, notes, and snippets.

View Thomas-A-Reinert's full-sized avatar

Thomas A. Reinert Thomas-A-Reinert

View GitHub Profile
@Thomas-A-Reinert
Thomas-A-Reinert / wp-config.php
Last active July 25, 2019 21:44
Purpose of this Code-Snippet for WordPress 'wp-config.php' is to have a Single Configuration that does not need to be changed each Time you push a new Release to Dev / Staging / Live-Servers
<?php
if (file_exists(dirname(__FILE__) . '/wp-config-local.php')) {
// If File exists include Config for Dev-Server Environment
include(dirname(__FILE__) . '/wp-config-local.php');
} elseif (file_exists(dirname(__FILE__) . '/wp-config-staging.php')) {
// If File exists include Config for Staging-Server Environment
include(dirname(__FILE__) . '/wp-config-staging.php');
@Thomas-A-Reinert
Thomas-A-Reinert / wp-config.php
Last active July 25, 2019 22:18
One WordPress wp-config.php to rule them all: Development-, Staging- and Live-Server.
<?php
/*
* One WordPress wp-config.php to rule them all: Development-, Staging- and Live-Server.
*/
// Define Environments
$environments = array(
'dev' => 'server.dev',
'staging' => 'staging.server.com',
'live' => 'www.server.com',