'enwiki', 'meta.localhost' => 'metawiki' ]; $wgCentralAuthLoginWiki = 'metawiki'; // You can't just set wgConf values to the globals defined in Setup.php for your // local wiki, because it hasn't run yet. You could hard-code $wgConf settings // here, but instead we set the wgConf values in a hook that runs later. $wgConf = new SiteConfiguration; # Read wiki lists $wgLocalDatabases = array( 'enwiki', 'metawiki' ); $wgConf->wikis = $wgLocalDatabases; $wgConf->suffixes = array( 'wiki' ); //We have the same suffix of wiki //all databases have suffix wiki $wgConf->suffixes = $wgLocalDatabases; $wgConf->localVHosts = array( 'localhost' ); //your database server. could be example.com or IP address. no http:// $wgConf->siteParamsCallback = 'efGetSiteParams'; $wgConf->extractAllGlobals( $wgDBname ); $wgConf->settings = array( 'wgServer' => array( 'enwiki' => 'http://en.localhost', 'metawiki' => 'http://meta.localhost', ), 'wgCanonicalServer' => array( 'enwiki' => 'http://en.localhost', 'metawiki' => 'http://meta.localhost', ), 'wgScriptPath' => array( 'default' => '', ), 'wgArticlePath' => array( 'default' => '/index.php?title=$1', ), 'wgLanguageCode' => array( 'enwiki' => 'en', 'metawiki' => 'meta', ), 'wgLocalInterwiki' => array( 'enwiki' => 'en', 'metawiki' => 'meta', ), 'wgAddGroups' => array( 'default' => array( 'bureaucract' => [ 'sysop', 'bureaucrat' ], ), ), ); function efGetSiteParams( $conf, $wiki ) { $site = null; $lang = null; foreach( $conf->suffixes as $suffix ) { if ( substr( $wiki, -strlen( $suffix ) ) == $suffix ) { $site = $suffix; $lang = substr( $wiki, 0, -strlen( $suffix ) ); break; } } return array( 'suffix' => $site, 'lang' => $lang, 'params' => array( 'lang' => $lang, 'site' => $site, 'wiki' => $wiki, ), 'tags' => array(), ); } ## Error reporting error_reporting( -1 ); ini_set( 'display_errors', 1 ); $wgShowSQLErrors = true; $wgDebugDumpSql = true; $wgShowExceptionDetails = true; $wgShowDBErrorBacktrace = true; ## Group rights $wgGroupPermissions['steward']['userrights'] = true; $wgGroupPermissions['steward']['userrights-interwiki'] = true; # $wgGroupPermissions['steward']['centralauth-lock'] = true;