site.php - Making a complete list of options plus an easy way to configure Local, DEV, Live environments

Permalink
Hi There,

Here are bunch of options for site.php that we've found from various places - looking to add to the list so please post your options/improvements/corrections (we're designers so chime in with better ways to configure stuff).

BTW, does anyone know if you can set user login options such as "Use emails for login". We're finding that certain options are not sticking when moving environments.

Here's our list so far - usual disclaimers apply and some items have not been tested by us personally. Have tried to link to all the places we've found stuff but can't remember everything - sorry if we missed you.

Also, is there a place in C5 that allows you to determine what all these settings are - or is it just your level of guruness?

Cheers

Ben

<?php
  define('DIR_REL', '');
  // ----------------------- PASSWORD SALT ----------------------------------------------------
  // Make unique to your site by logging into the C5 control panel and resetting the admin account's password
  define('PASSWORD_SALT', 'LfJ61s5bZTp8NEOoQvg4sVpL5e7vUm6zE2aq4DVUUVBJa9mW9neilYUjMsuImHtW');
  // ----------------------- ENVIRONMENTS ---------------------------------------------------- 
  // Loads correct database based on incoming domain (example domains shown)
  // Put live production site first:
  if ($_SERVER['HTTP_HOST'] == 'site-name.com') { // Production site
      define('DB_SERVER', 'localhost'); // Or whatever your DB server address is
      define('DB_USERNAME', 'db-username');
      define('DB_PASSWORD', 'db-password');
      define('DB_DATABASE', 'db-name');
      define('BASE_URL', 'http://www.site-name.com');
      } else if ($_SERVER['HTTP_HOST'] == 'site-name.dev.com') { // DEV server

 
mhawke replied on at Permalink Reply
mhawke
Thanks for the contribution. I'll use some of those items!

Here's a free add-on that lists all the constants built by a true C5 guru, JohntheFish.

http://www.concrete5.org/marketplace/addons/constants-info/...
cmscss replied on at Permalink Reply
Thanks mate - will definitely check out that add-on!