From a5dd0df9521cba2e63a6052011db7d17ce7dd6aa Mon Sep 17 00:00:00 2001
From: Damjan Georgievski <gdamjan@gmail.com>
Date: Sat, 1 Oct 2016 17:01:38 +0200
Subject: [PATCH] allow custom pathname to configuration
configure the pathname to the `wp-config.php` file with a
`WP_CONFIG_FILE` environment variable.
---
wp-load.php | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/wp-load.php b/wp-load.php
index 76dda74..1a8d102 100644
a
|
b
|
error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_W |
33 | 33 | * |
34 | 34 | * If neither set of conditions is true, initiate loading the setup process. |
35 | 35 | */ |
36 | | if ( file_exists( ABSPATH . 'wp-config.php') ) { |
| 36 | if ($config = getenv('WP_CONFIG_FILE') { |
| 37 | |
| 38 | /** Custom path to config file */ |
| 39 | require_once($config); |
| 40 | |
| 41 | } elseif ( file_exists( ABSPATH . 'wp-config.php') ) { |
37 | 42 | |
38 | 43 | /** The config file resides in ABSPATH */ |
39 | 44 | require_once( ABSPATH . 'wp-config.php' ); |