One config file for local, dev, stage and production environments.
Inspired by Jamie Pittocks EECI2010 US presentation; The team at Newism re-thought our approach to config files, global variables and deployment in ExpressionEngine 2 and the result is our own
- Multiple environments: Configure multiple environments including databases and server paths
- Global variables: Set and update early parsed global variables
- Dynamic: Environment loaded based on the URL
config_bootstrap.php file is straight forward if you have some knowledge of server setups and PHP. If you're not comfortable setting up domains or PHP it's probably better if you stick to the default control panel based ExpressionEngine configuration behavior.
- Download the latest version
- Copy the file to the root of your site
to the bottom of
require(realpath(dirname(__FILE__) . '/../../config_bootstrap.php'));
Note: This file is not for everyone. Each ExpressionEngine install is different so you may need to change the
require() path, asset paths or server name conditionals.
config_bootstrap.php file tests for four different environments based on the first subdomain of the current URL. They are:
- local.yourdomain.com: Local development environment, generally your laptop or office workstation.
- dev.yourdomain.com: Continuous development environment, used for shared team based development. Could be in the office or on a remote server
- stage.yourdomain.com: Staging development environment, a working copy of your site on the live server Used for client previews before live deployment.
- yourdomain.com: The real deal, the live site.
The current version of Newism's
config_bootstrap.php file. View the raw version here.