ImpressPages configuration values can be changed in system configuration file config.php.

Get configuration value

<?php echo ipConfig()->get('timezone'); // Gets 'timezone' configuration value

See the list of available configuration values below.

Available configuration values

Key Value Purpose
adminLocale string Language code for administration pages.
baseDir string Absolute path to the website root is generated by ImpressPages automatically. Set this configuration value if automatic setting does not work.
charset string HTML charset
db array

Database connection settings. See "Database connection settings" table below for more details.

For security reasons, this configuration value can't be accessed using ipConfig() function.

debugMode boolean Debug mode loads raw unminified JS files, alerts AJAX errors.
defaultDoctype string HTML doctype.  Default value 'DOCTYPE_HTML5'
developmentEnvironment boolean Displays error and debug information. Change to 0 before deploying to production server.
disableHttpOnlySetting boolean

ImpressPages sets PHP session.cookie_httponly setting to true by default. Use this setting to disable this behaviour.

fileOverrides array

deprecated and will be removed in 5.0.0 version

Allows to override directories for ImpressPages files:

'fileOverrides' => array(
'Theme/' => '/var/www/themeDir/',

rewritesDisabled boolean Set to true if mod_rewrite is disabled.
sessionName string Prevents session conflict when two sites runs on the same server.
showErrors boolean Set to 0 if you don't wish to display errors on the page.
theme string

Current theme name.

timezone string PHP 5 requires timezone to be set. E.g. 'UTC'

urlOverrides array

Allows to specify different URLs for ImpressPages files:

'urlOverrides' => array(

    'Ip/' => '', )

CDN usage example

Database connection settings 

Key Meaning
hostname Database host name or IP address
username Database username
password Database user's password
tablePrefix Table prefix for ImpressPages tables
database Database name
charset Charset
driver (since 4.2.1)

Database engine driver. Two drivers available: 'mysql' or 'sqlite'. Default is 'mysql'.

some plugins may not support SQLite

Get a current theme name

<?php echo ipConfig()->theme();

The code above outputs a name of current website's theme.

Check if a site is running in development environment

    if (ipConfig()->isDevelopmentEnvironment()){

The example above checks if the site is running in development environment and shows HTTP request dump.

To switch a website to development environment mode, set developmentEnvironment constant value  to 1 in config.php file.

Check if a site is running in debug mode

    if (ipConfig()->isDebugMode()){

 Website title & email

ImpressPages provides a global setting to store website's title and email. Both values can be set in Config section of admin. This is how you can get these values in PHP

$websiteTitle = ipGetOptionLang('Config.websiteTitle');
$websiteEmail = ipGetOptionLang('Config.websiteEmail');

You can set different values for each language. The function returns correct value depending on the language of currently rendered page. Pass language code as a second parameter to get specific language value

$websiteTitle = ipGetOptionLang('Config.websiteTitle', 'en');
$websiteEmail = ipGetOptionLang('Config.websiteEmail', 'en');

See also

comments powered by Disqus