In BigTree 4.0, all configuration settings are located in /templates/config.php — this was split into /custom/settings.php and /custom/environment.php in BigTree 4.1 to better facilitate live and development environments.

Most of the settings that pertain to your server parameters are located in /custom/environment.php — these include debug status, URL settings, database connection parameters, and caching. Settings that pertain to the build of your website such as CSS and JavaScript variables, which WYSIWYG editor to use, and image quality settings can be found in /custom/settings.php. All configuration variables are setting in the $bigtree["config"] array. Below is an exhaustive list of configuration variables.


The first entry in environment.php is a declaration of time zone. If your server already has the proper time zone for your website configured you can remove this.

The debug flag determines whether to draw errors and log SQL calls. If set to true, in $bigtree["sql"] you will find a running array of SQL queries and errors. You will also see warnings and errors displayed. Specifically, BigTree turns display_errors off when debug is set to false and runs the following code when set to on:

error_reporting(E_ALL ^ E_NOTICE);

This is set to the base domain that your site is located at. For instance, if your site is at your domain is simple The domain variable is used for setting cookies properly in the admin.

This is set to the location of the homepage of your website and is available as the WWW_ROOT constant in your code.

This can be the same as www_root or it can be a different domain that contains your static resources (images, CSS, JavaScript) for serving from a cookie-less domain. This variable is available as the STATIC_ROOT constant in your code. This can also be used creatively in a development environment to use image/file uploads from a live site by setting the static_root to the live website's www_root. Keep in mind when doing this you will want to serve any CSS/JS that's run through BigTree via WWW_ROOT instead of STATIC_ROOT. BigTree stores uploaded files with a variable that decodes to the static_root by default so that the database is portable.

This should begin with your www_root and end with the location you wish to serve your admin from. It does not have to be a single directory, though the default is equivalent to $bigtree["config"]["www_root"]."admin/", you could set your admin_root to $bigtree["config"]["www_root"]."my/obscure/admin/".

If this variable is set to true, BigTree will force users to login to the admin through HTTPS.

This variable can be set to either "dev" or "live". If it is set to "dev" and $bigtree["config"]["environment_live_url"] is set, a flag will appear alerting users that they are currently working in the development site and changes will not affect the live site.

The URL of the live site's admin area (if this is the development site).

Setting this variable to true will lock all non-Developer accounts out of the admin and present them with a message informing them that maintenance is underway.

If this URL is set, site visitors will be redirected to it and served a template driven by /templates/basic/_maintenance.php. A HTTP 307 (temporary redirect) code will be used. A logged in Developer account can still access the front end of the site while in maintenance mode.

The routing mode that's engaged in the site. If this is set to "basic", BigTree's /site/install.php will behave differently (for servers that don't support rewrites).

Enables simple flat-file caching of your pages based on the URL. Read More About Caching

This variable determines which MySQL interface PHP uses. By default, BigTree will try to use the "mysqli" or MySQL Improved Extension. If for some reason your version of PHP only supports the older MySQL extension (which has been deprecated as of PHP 5.5) you can change this variable to "mysql" and it will fall back to the old extension.

This is an array of database connection parameters:

  • "host" — The location of your MySQL database
  • "name" — The database you're using for BigTree
  • "user" — The username you use to connect to MySQL
  • "password" — The password you use to connect to MySQL

If you are running load balanced MySQL instances with a master server and one or more slaves, the db_write variable allows you to setup a dedicated write server. All write-based queries run through the sqlquery function will be routed to the write database instead of your default read database. The array keys are the same as those for $bigtree["config"]["db"].


CSS Processor Settings

The following variables are all related to BigTree's CSS Processor. If you have not read the documentation for the CSS Processor, do so before editing these variables.

Setting this flag to true enables automatic vendor prefixing for many common CSS3 properties for files served through the CSS Processor. For instance, "border-radius: 3px;" will become "border-radius: 3px; -webkit-border-radius: 3px; -moz-border-radius: 3px;".

Whether to minify CSS (true) or not (false) files served through the CSS Processor.

An array of "files" to create from static CSS files to be served through the CSS Processor.

An array of variable names and values to replace in your CSS files that are served through the CSS Processor.

JavaScript Processor Settings

 The following variables are all related to BigTree's JavaScript Processor. If you have not read the documentation for the JavaScript Processor, do so before editing these variables.

Whether to minify JavaScript (true) or not (false) files served through the JavaScript Processor.

An array of "files" to create from static JavaScript files to be served through the JavaScript Processor.

An array of variable names and values to replace in your JavaScript files that are served through the JavaScript Processor.

Admin-Related Settings

This is an array that determines the WYSIWYG HTML editor to load. Currently there are only two options (BigTree will default to the older TinyMCE 3 if no setting is present but in BigTree 4.1+ the default configuration setting is TinyMCE 4):

 // TinyMCE 3
array("name" => "TinyMCE 3","src" => "tinymce3/tiny_mce.js")

// TinyMCE 4
array("name" => "TinyMCE 4","src" => "tinymce4/tinymce.js"

This is the amount of "work" that goes into hashing passwords. The default is 8, which is a good balance of security and work. This is an exponentially increasing amount of work. While these are just one set of benchmarks, running 10 password hashes on a quad core 3.7GHz Intel i7 machine, they should give you an idea of where you should set this value:

  • Password Depth 8 (default) — 0.11 seconds average
  • Password Depth 10 — 0.41 seconds average
  • Password Depth 12 — 1.6 seconds average
  • Password Depth 14 — 6.4 seconds average
  • Password Depth 16 — 25.3 seconds average

As you can see, doubling of password depth equates to 250 times the amount of work (and an average of 2.5 seconds per password hash). Passwords are hashed in the following instances, so when weighing the cost/benefit ratio keep this in mind:

  • When a user changes their password
  • When a user is created
  • When a user logs in

This is an array of additional CSS files to load into the admin interface. If you wish to customize the look of the admin or need additional CSS for your custom module pages or field types, you should load a CSS file through this array.

This is an array of additional JS files to load into the admin interface.

Set this to true to disable notifications in Developer that new versions of BigTree are available. This is a good idea if you've heavily modified your installation via /custom/ overrides (but keep an eye out for bugfix or security releases on

Image Settings

When compressing JPEG images with PHP's GD extension we accept an image quality value from 0 - 100. The lower image quality value the smaller the file size. Quality values over 90 greatly increase the size of the image. BigTree's default setting is 90.

When generating Retina Images you have a separate quality setting. Due to downsampling on normal displays you can generally get by with a much lower quality setting.

If this setting is set to true, images will always be converted to JPEGs even if the user uploads a PNG.

This is an array of configurations for placeholder images. BigTree supports automatically generating placeholder images by hitting a URL in the format of (where the last route in the URL is your width x height). The "default" key in this placeholder array defines what a default placeholder image should look like. You can also add additional keys such as "test" that would then use the "test" array configuration to generate an image at The follow keys of each configuration array apply:

  • background_color — A hex value (without the #) of an RGB color to use as the background
  • text_color — A hex value (withouth the #) of an RGB color to use as the text color
  • image — If an image is specified it will be centered in the placeholder image (this should be a full path to a locally stored image)
  • text — Text to be drawn in the placeholder image (defaults to the width x height -- i.e. 100x100)

Misc Settings

If you'd like all pages on the front end of your site to be run through an output filter, set this to the name of the function to use. Read more about the output callback on the PHP documentation for ob_start.

For encrypted settings, this is the encryption key used to encode/decode them. While not providing a great deal of extra security it does protect your encrypted settings from a SQL database breach where the file system remains intact. By default this is a random string created during the install process. If you change it after working with encrypted settings you will lose their existing values.

Base/Admin Class Definitions
These definitions allow you to extend BigTreeCMS and BigTreeAdmin. They are described in more depth on the Overriding Core page.