Note:
When editing a config.php file, make sure there is no whitespace or extra lines either before the <?php. If there are any extra lines or space, you will see an 'Unable to add headers' error when accessing your forums.
You are only required to edit a few of the the settings in this file to create a working vBulletin configuration file. These settings are:
Variable Name | Description |
$config['Database']['dbtype'] | This tells vBulletin how to access your database. The default is satisfactory for most purposes. However if your server supports MySQLI, you would want to set this to 'mysqli' in order to have improved performance. |
$config['Database']['dbname'] | This value should be altered to state the name of the database that will contain your vBulletin installation on the database server. |
$config['Database']['technicalemail'] | An email address should be entered here. All database error messages will be forwarded to the email address provided. It is important to fill in this variable for support purposes. It should be a valid email that you receive emails at regularly. It should not be your personal email address. |
$config['MasterServer']['servername'] | This sets the address of your database server. On most installations the database server is located on the same computer as the web server, in which case the address should be set to 'localhost', otherwise use the address of the database server as supplied by your web host. |
$config['MasterServer']['username'] | This variable contains the username provided to you by your host for connecting to your database server. |
$config['MasterServer']['password'] | The password that accompanies the database username should be entered here. |
Note:
Please note that the vBulletin Support Team can not provide the values you require for $config['Database']['dbname'], $config['MasterServer']['servername'], $config['MasterServer']['username'], and $config['MasterServer']['password']. These variables are only available from the web host providing your web/database server.
Note:
Please note, these are organized by function, not their actual location in the file. They are included here for completeness
Variable Name | Description |
$config['Database']['tableprefix'] | In order to easily identify the tables related to vBulletin in your database, you may prefix the names of all tables with a few letters or a word. For example, if you specify the $config['Database']['tableprefix'] as 'vb_' then all tables will be prefixed with vb_, making vb_forum, vb_user etc. If you choose to change your $config['Database']['tableprefix'] at some point after you have installed your vBulletin, tools are provided to do this. |
$config['MasterServer']['usepconnect'] | Setting this variable to 1 will cause PHP to use persistent connections to the MySQL server. For very large vBulletin installations, using persistent connections may result in a slight performance boost but in most cases leaving it set to 0 (off) is the best option. If you are unsure, leave it set to 0 |
$config['Mysqli']['charset'] | If you need to set the default connection charset because your database is using a charset other than latin1, you can set the charset here. If you don't set the charset to be the same as your database, you may receive collation errors. Ignore this setting unless you are sure you need to use it. |
$config['Mysqli']['ini_file'] | PHP can be instructed to set connection parameters by reading from the file named in 'ini_file'. Please use a full path to the file. This is generally used to set the connection's default character set. This setting should also be ignored unless you are sure you need to use it. |
These variables only apply if you have a Slave Database configured. If you are not sure, you should leave these variables alone. This is an advanced setting!
Security Related Options
Variable Name | Description |
$config['SpecialUsers']['canviewadminlog'] | All actions performed in the vBulletin Administrators' Control Panel are logged in the database. This variable controls the permissions for which users are allowed to view this log. The variable takes the form of a list of user IDs separated by commas. For example, if you would like the users with user IDs 1, 15 and 16 to be able to view the Admin Log, this variable would be set like this: $config['SpecialUsers']['canviewadminlog'] = '1,15,16'; |
$config['SpecialUsers']['canpruneadminlog'] | In the same way as $config['SpecialUsers']['canviewadminlog'] controls which users can view the Admin Log, $config['SpecialUsers']['canpruneadminlog'] controls which users are permitted to prune (delete items from) the Admin Log. Use the same user IDs separated with commas system as with the $config['SpecialUsers']['canviewadminlog'] setting. |
$config['SpecialUsers']['canrunqueries'] | The vBulletin Administrators' Control Panel contains a simple interface for running queries directly on the database. This variable contains the IDs of the users with permission to do this. For security reasons you may wish to leave this list totally empty. |
$config['SpecialUsers']['undeletableusers'] | If your vBulletin installation is going to have multiple users with administrative privileges, you may wish to protect certain users from accidental (or even malicious) deletion or editing. Any user IDs entered into this list will not be editable or deletable from the Administrators' Control Panel by anybody. |
$config['SpecialUsers']['superadministrators'] | Any users whose user IDs are specified within the $config['SpecialUsers']['superadministrators'] setting will be automatically granted full access to all vBulletin features, including the ability to set the permission levels of other administrators. |
Note:
The variables $config['SpecialUsers']['canviewadminlog'], $config['SpecialUsers']['canpruneadminlog'], $config['SpecialUsers']['canrunqueries'], $config['SpecialUsers']['undeletableusers'] and $config['SpecialUsers']['superadministrators'] should all contain a single userid number, a comma-separated list of user id numbers, or nothing at all. For example:
$config['SpecialUsers']['canviewadminlog'] = '1,15,16';
$config['SpecialUsers']['canpruneadminlog'] = '1';
$config['SpecialUsers']['canrunqueries'] = '';
$config['SpecialUsers']['undeletableusers'] = '1,15';
$config['SpecialUsers']['superadministrators'] = '1';
$config['SpecialUsers']['canviewadminlog'] = '1,15,16';
$config['SpecialUsers']['canpruneadminlog'] = '1';
$config['SpecialUsers']['canrunqueries'] = '';
$config['SpecialUsers']['undeletableusers'] = '1,15';
$config['SpecialUsers']['superadministrators'] = '1';
Variable Name | Description |
$config['Misc']['admincpdir'] | By default, vBulletin will install the files for the Administrators' Control Panel into a folder called admincp, but you may wish to rename this folder this for security purposes. If you rename the folder, enter the new name here. Note that you can only rename the folder, if you move the folder to a new location the system will be unable to function. |
$config['Misc']['modcpdir'] | This variable is similar to the $admincpdir setting, with the exception that $modcpdir refers to the Moderators' Control Panel rather than the Administrators' Control Panel. |
$config['Misc']['cookieprefix'] | When vBulletin sets cookies on users' computers they will all be prefixed with a few characters in order to be easily identified as cookies set by vBulletin. By default this prefix is bb but you can change it to be whatever you like. This option is particularly useful if you have many vBulletin installations running on the same domain. This must match the value set in the presentation config.php file. |
$config['Misc']['forumpath'] | Some systems may require a full path to the forum files. If vBulletin does not tell you that you need this, leave this blank. |