If you wish to define any of these constants for your site, you should put them in the index.php file in your site’s web root, after setting
// Path to your craft/ folder $craftPath = '../../craft'; // This is for the Dutch site define('CRAFT_SITE_URL', 'http://example.com/nl/'); define('CRAFT_LOCALE', 'nl');
General Constants #
Defines the name of the current environment, which defaults to the server’s host name. (See Multi-Environment Configs for more info.)
Sets the locale for the current request. Without setting this, your site’s primary locale will always be used.
Overrides the Site URL setting in Settings → General. That can be useful in combination with
CRAFT_LOCALE for creating a locale-specific version of your site.
You’re free to use environment-specific variables in the value as well:
Path Constants #
You don’t have to keep all of the craft/* subfolders in one place. The following constants can be used to split the folder up into multiple locations, which can be useful if you want to share some files between multiple sites. See Sharing a craft/app Folder Across Multiple Sites for more info.
Craft uses this as the starting point for finding all of the folders traditionally located in craft/, with the notable exception of craft/app/, whose path gets defined with the help of your
$craftPath variable in index.php.
// Path to your craft/ folder (where the app/ folder lives) $craftPath = '../../craft'; // Path to where the rest of the craft/* folders live define('CRAFT_BASE_PATH', '../craft_sitefiles/');
Defines the path to your craft/config/ folder.
Defines the path to your craft/plugins/ folder.
Defines the path to your craft/storage/ folder.
Defines the path to your craft/templates/ folder.
Defines the path to your craft/translations/ folder.