Manual:$wgConf

Details
Create a site configuration object. Not used for much in a default install.

This is used on Wikimedia's mass installation to provide a centralized configuration file for a few hundred wikis, providing defaults per site group and per-wiki overrides.

It can be a bit confusing, though. :)

Currently needed by Extension:CentralAuth to fetch per-site information, eg linking to the proper user pages on each wiki.

Example
Quickie example from my local test setup, which contains two wikis linked with CentralAuth.

Wikis are grouped by the suffix on their database names; on a large installation there may be eg 'enwiki' and 'enwiktionary' and 'enwikibooks', each in a different suffix group.

Settings may be assigned to 'default' to affect all wikis, a suffix (eg 'wiki' or 'wiktionary') to affect all in that suffix group, or a specific DB name.

In LocalSettings.php:

$wgLocalDatabases = array(	'shortwiki',	'eowiki', ); $wgConf = new SiteConfiguration; $wgConf->wikis = $wgLocalDatabases; $wgConf->suffixes = array( 'wiki' ); $wgConf->localVHosts = array( 'venti.local' ); $wgConf->initialise;

require "$IP/InitialiseSettings.php"; $globals = $wgConf->getAll( $wgDBname, 'wiki', array, array ); extract($globals);

In InitialiseSettings.php:

settings = array(

'wgServer' => array(	'default' => 'http://venti.local', ),

'wgSitename' => array(	'shortwiki' => "VentiWiki",	'eowiki' => 'Vikipedio', ),

'wgScriptPath' => array(	'shortwiki' => '/trunk',	'eowiki' => '/eo', ),

'wgArticlePath' => array(	'shortwiki' => '/trunk/index.php/$1',	'eowiki' => '/eo/index.php/$1', ),

);