• Skip to main content
  • Skip to primary sidebar

xfpoint

XenForo Resource Site with Tips, Tricks and Hacks

  • Home
  • About
  • Glossary
  • Guides
  • Tutorials
  • Add-ons
  • Contact
You are here: Home / Glossary / What Is: Config.php

What Is: Config.php

May 2, 2017 by Shabbir Bhimani

Config.php file resides inside the library folder and is used to configure XenForo settings.

Config.php

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';
view raw config.php hosted with ❤ by GitHub

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.

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on WhatsApp (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)

Filed Under: Glossary Tagged With: Config.php, Configuration, Database, Settings

About Shabbir Bhimani

xfpoint.com is an independent XenForo resource site with tips, tricks, hacks, and resources for new XenForo webmasters to improve their community. Read More…

Primary Sidebar

About Shabbir Bhimani

xfpoint.com is an independent XenForo resource site with tips, tricks, hacks, and resources for new XenForo webmasters to improve their community. Read More…

© xfpoint 2025. xfpoint.com is an independent XenForo resource site for new xenForo webmasters.

Copyrighted code samples of XenForo will be visible only if you have a valid xenForo license.