-
In your main site's
index.phpfile (and also youradmin.phpandsystem/index.phpfiles), add the following lines just below the custom config values section:define('FLC_DOCROOT', $_SERVER['DOCUMENT_ROOT']); define('FLC_PATH', $_SERVER['DOCUMENT_ROOT'].'/config');
-
In
config.master.php, update the lines 94 and 235 as follows:$base_path = FLC_DOCROOT; require FLC_PATH . '/config.' . ENV . '.php';
-
In
system/expressionengine/config/config.phpandsystem/expressionengine/config/database.php, change therequirelines as follows:require FLC_PATH . '/config.master.php';
-
In each of your MSM sites'
index.phpfiles, add the lines from #1 above, but make sure to changeFLC_PATHto your main site's config folder.
-
-
Save akuzemchak/d27570a3e52bdf656f54 to your computer and use it in GitHub Desktop.
Sorry, never saw this comment. Just updated the gist to say that the lines in step 1 need to also be defined in admin.php and system/index.php.
Thanks for this!
Hi, thanks for this! working fine for the main site. With point (4), can you give an example, do you mean the master config folder or the ee config folder. I've tried just hardcoding both like:
define('FLC_PATH', '/var/www/vhosts/mainsite.com/httpdocs/config'); But no child msm site loads.
Regards,
James.
Hi guys,
I've set this up (v3.3.2) but seem to be getting a bizarre issue.
Fatal error: Cannot redeclare class EE_Benchmark in /var/www/html/www.heffron-it.com.au/system/ee/legacy/core/Benchmark.php on line 30
Has anyone else run into this, or does this solution no longer work?
EDIT [SOLVED]
$env_config['subclass_prefix'] = 'EE_'; is required
Hi there! I've done as you suggest but now when I go to the CP www.mysite.com/admin.php i get an error beacesue the costants are not defined (FLC_DOCROOT and FLC_PATH are defined in index.php) any idea?