diff --git a/system/src/Grav/Common/Config/Setup.php b/system/src/Grav/Common/Config/Setup.php index 316b090d5..e9180fea8 100644 --- a/system/src/Grav/Common/Config/Setup.php +++ b/system/src/Grav/Common/Config/Setup.php @@ -137,7 +137,8 @@ class Setup extends Data // Pre-load setup.php which contains our initial configuration. // Configuration may contain dynamic parts, which is why we need to always load it. - $file = GRAV_ROOT . '/setup.php'; + // If "GRAVE_SETUP_PATH" has been defined, use it, otherwise use defaults. + $file = defined('GRAV_SETUP_PATH') ? GRAV_SETUP_PATH : GRAV_ROOT . '/setup.php'; $setup = is_file($file) ? (array) include $file : []; // Add default streams defined in beginning of the class.