Published by Mijingo

tips icon image

EE Insider Tips
Sponsored by Mijingo's EE 2 Screencasts

ExpressionEngine mini-howtos created by the EE Insider community.

Config Overrides for EE 1 and 2

  • Posted by Ryan Irelan
  • June 17, 2010

I don’t think I’ve seen this one before, but the EE Wiki contains a full list of config.php overrides, which are easily found by doing the following in a EE 1.6.x template with PHP enabled:

<?php 
    
global $PREFS;
    
print_r($PREFS);
?> 

The list in the wiki is only for 1.6.7, so some may have changed or been added.

To get this to work in EE 2 you need to do it a little differently (again in a EE template with PHP enabled). EE 2 does away with the global $PREFS, so you need to print out the available config settings:

<?php
    print_r
($this->EE->config->config);
?> 

This will output a long list of config settings that you should be able to use in your config.php file to override values stored in the database. Here’s the list I came up with when checking against the beta.

Kcotter09:44 on 06.17.2010

I saw the 1.6 list the other day and was wondering if their was a 2.0 list. Then this comes out at the perfect time! Thanks a ton!

cityzen09:59 on 07.14.2010

if you want the output to be formatted in a readable format you can wrap it in

 tags:

<?php
    echo '<pre>';
    print_r($this->EE->config->config);
    echo '

‘;
?>