Config.php file resides inside the library folder and is used to configure XenForo settings.
The basic code in the file is as follows:
<?php | |
$config['db']['host'] = 'localhost'; | |
$config['db']['port'] = '3306'; | |
$config['db']['username'] = 'root'; | |
$config['db']['password'] = ''; | |
$config['db']['dbname'] = 'xenforo'; | |
$config['superAdmins'] = '1'; |
It contains the database connection settings which includes the database name, host (typically localhost), username and password. These settings allow XenForo to communicate with MySQL database to store and retrieve data (aka forums, thread, posts, templates, etc).
When you upgrade XenForo, the config.php file doesn’t get overwritten and so the changes in the config files are preserved across upgrades.
Example of config.php file setting is to enable the development mode.
Checkout the official documentation for all the advance options for config.php file. Apart from the core XenForo other plugins can also offer config.php file settings.