vB5 Manual and API Documentation
Forums API Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

vBulletin Configuration Variables

vBulletin is a complex piece of software designed to run on a large variety of server configurations. To handle this, we occassionally add variables that the user can change depending on their particular needs. This file provides a list of all configuration values that can be set in the /core/include/config.php file. Many of these variables will exist with default values in the file as it ships but this isn’t required for all of them. Changing these values will affect how your vBulletin site operates.

Note: Many of the variables listed here will have additional documentation in the/core/includes/config.php file.

Editing the config.php file

Everything to the left of the equal (=) sign will define the variable and should not be changed. When making any changes to the file, the edit should always be to the right of the equal (=) sign between the single quotes.

  • Default: $config['MasterServer']['username'] = 'root';
  • Good Example: $config['MasterServer']['username'] = 'myuser';
  • Bad Example: $config['MasterServer']['myuser'] = 'root';

Comments

Some lines will require you to remove comment indicators. Comments are special blocks of code that the server will ignore when processing the vBulletin files. Comments come in two formats:

  • //: A comment for that line only. To remove delete the // from the beginning of the line.
  • \* *\: Comments out a block of code. Deleting both the leading \* and the ending *\ will remove the comment.

Improperly removing comments can cause fatal processing errors in vBulletin.

Cookies

Prefix that all vBulletin cookies will have. Keep this short and only use numbers and letters, i.e. 1-9 and a-Z. When editing this value, you must change the corresponding value in the presentation configuration file (/config.php). Otherwise users will not be able to sign into your vBulletin.

  • $config[‘Misc’][‘cookieprefix’]

This variable has an equivalent variable within the /config.php file. The values for both variables must match.

  • $config[‘cookie_prefix’] = ‘bb’;

Database

  • $config[‘Database’][‘dbtype’] (deprecated): This variable was removed from the config.php file in vBulletin 5.6.0
  • $config[‘Database’][‘dbname’]: Used to configure the database you are using. The database name must be the same across all MySQL instances for your installation.

Master Server

The master server is the location of the main MySQL database. This database is responsible for all data writes to the system.

  • $config[‘MasterServer’][‘servername’]: Server Name or IP on your local network. This is most often ’localhost’ or ‘127.0.0.1’.
  • $config[‘MasterServer’][‘port’]: The port that MySQL is active on. The default value is 3306 and will work for most installations.
  • $config[‘MasterServer’][‘username’]: The username that you would access MySQL with. This user must have all permissions (except Grant) to the database named above.
  • $config[‘MasterServer’][‘password’]: The password for the user specified above.
  • $config[‘MasterServer’][‘usepconnect’] (deprecated): Used with older versions of MySQL. This setting does not provide much value on modern servers.

Slave Server

A secondary server used to distribute the MySQL load across multiple servers. However, you may find more performance using MySQL Cluster solutions instead of a master/slave combination. The variables below correspond to the same variables for the master server. Since each server is different, these variable may have different values.

  • $config[‘SlaveServer’][‘servername’]
  • $config[‘SlaveServer’][‘port’]
  • $config[‘SlaveServer’][‘username’]
  • $config[‘SlaveServer’][‘password’]
  • $config[‘SlaveServer’][‘usepconnect’]

Server Mode

These allow for some basic configuration of MySQL at runtime. They should be reserved for advanced users and not edited without database administration knowledge.

  • $config[‘Mysqli’][‘charset’] = ‘utf8’;
  • $config[‘Mysqli’][‘ini_file’] = ‘’;

Caching

System Cache

  • $config[‘Cache’][‘class’][0] = ‘vB_Cache_Db’; //regular cache
  • $config[‘Cache’][‘class’][1] = ‘vB_Cache_Memory’; //fastest cache
  • $config[‘Cache’][‘class’][2] = ‘vB_Cache_Db’; //largest cache and longest life.

FastDS

// $config[‘fastDS’] = true; // Use to enable or disable fastDS (true/false). // $config[‘fastDSType’] = ‘APC’; // Storage Type, at this time APC is the only option. // $config[‘fastDSPrefix’] = ‘’; // Prefix to prevent collisions on shared systems. Defaults to datastore prefix. // $config[‘fastDSLimit’] = 6000000; // Limits the amount of memory consumed, in bytes

File System

Allows you to store any of the caches to the file system. This isn’t recommended and may cause a performance decrease. If you do decide to store your cache in the filesystem, the directory should not be accessible via the web.

  • $config[‘Cache’][‘fileCachePath’] = ‘/valid/writeable/for/my/webserver’;

Datastore

Tells the system where to store the datastore cache. The datastore is used for semi-static information like options, phrases, style variables and usergroup permissions.

  • $config[‘Datastore’][‘class’] = ‘vB_Datastore_Memcached’;

Memcached

Tells vBulletin how to connect to Memcached. These are setup in a loop in the config.php file. To utilize multiple memcached servers, you can duplicate the block below and update the new block to point to a second server.

$config[‘Misc’][‘memcacheserver’][$i] = ‘127.0.0.1’; $config[‘Misc’][‘memcacheport’][$i] = 11211; $config[‘Misc’][‘memcachepersistent’][$i] = true; $config[‘Misc’][‘memcacheweight’][$i] = 1; $config[‘Misc’][‘memcachetimeout’][$i] = 1; $config[‘Misc’][‘memcacheretry_interval’][$i] = 15;

Memcached Prefix

$config[‘Cache’][‘memcacheprefix’] = ‘’;

Uploads

Images

  • $config[‘Misc’][‘maxwidth’] = 4608;
  • $config[‘Misc’][‘maxheight’] = 4608;
  • $config[‘Misc’][‘preserve_exif’] = true;

Upload Security

  • $config[‘Misc’][‘uploadallowedports’] to add additional ports that we’ll allow uploads from.
  • $config[‘Misc’][‘uploadallowip’] which will allow urls like http://189.5.4.1/some/file
  • $config[‘Misc’][‘uploadallowlocal’] which will allow local IP addresses

Note: Both $config['Misc']['uploadallowip'] and $config['Misc']['uploadallowlocal'] also apply to local IP Addresses like 127.0.0.1 and ::1. If one is not configured, calls to local IP addresses will be rejected.

Security

IP Address Restrictions

You can provide a list of IP addresses that can access the Control Panels. This can increase security of your site. Enter IP Addresses (XXX.XXX.XXX.XXX) separated by a comma. An Empty value disables this feature.

  • $config[‘Security’][‘AdminIP’]: This should be a comma separated list of IP Addresses that should have access to the AdminCP.
  • $config[‘Security’][‘ModIP’]: This should be a comma separated list of IP Addresses that should have access to the ModCP.

Two-Factor Authorization

This will require that logins for the modcp, admincp, site builder, inline moderation will require a numeric code generated via an app on the user’s cell phone or desktop Admins and moderators will be able to log into normal user portions of the site without any changes.

  • $config[‘Security’][‘mfa_enabled’]: Enables Two-Factor Authorization for the entire site.
  • $config[‘Security’][‘mfa_force_cp’]: Setting this to true will require administrators and moderators to use Two-Factor Authorization. Leaving it at false, makes this optional.

The vBulletin Community site has more information on Two-Factor Authorization.

Additional Security

//    ****** USERS WITH ADMIN LOG VIEWING PERMISSIONS ******
//    The userids specified here will be allowed to view the admin log in the control panel.
//    Users must be specified by *ID number* here. To obtain a user's ID number,
//    view their profile via the control panel. If this is a new installation, leave
//    the first user created will have a user ID of 1. Seperate each userid with a comma.

$config[‘SpecialUsers’][‘canviewadminlog’] = ‘1’;

//    ****** USERS WITH ADMIN LOG PRUNING PERMISSIONS ******
//    The userids specified here will be allowed to remove ("prune") entries from the admin
//    log. See the above entry for more information on the format.

$config[‘SpecialUsers’][‘canpruneadminlog’] = ‘1’;

//    ****** USERS WITH QUERY RUNNING PERMISSIONS ******
//    The userids specified here will be allowed to run queries from the control panel.
//    See the above entries for more information on the format.
//    Please note that the ability to run queries is quite powerful. You may wish
//    to remove all user IDs from this list for security reasons.

$config[‘SpecialUsers’][‘canrunqueries’] = ‘’;

//    ****** UNDELETABLE / UNALTERABLE USERS ******
//    The userids specified here will not be deletable or alterable from the control panel by any users.
//    To specify more than one user, separate userids with commas.

$config[‘SpecialUsers’][‘undeletableusers’] = ‘’;

//    ****** SUPER ADMINISTRATORS ******
//    The userids specified below will have permission to access all areas of vBulletin 5.
//    Note that this is different to vB3 & vB4 where they only had extra permissions in the
//    Admin Control Panel. Be very careful who you grant this super power to.
//    The name of this setting has changed from superadministrator to superadmins.
//    This is to avoid the accidental granting of this permission when using older config files.

$config[‘SpecialUsers’][‘superadmins’] = ‘1’;

Proxy

Troubleshooting

Miscellaneous

$config[‘Misc’][‘modcpdir’] (deprecated): This value should not be changed.