User:Mainframe98/Wiki Family

Manual:Wiki family is quite confusing, and most likely out of date. That it is possible is proven by the many farms out here, some even using configurations similar to Wikimedia. It is my attempt to make things worse create (yet another) guide on creating a Wiki family. This example is based on the approach by Wikimedia. Why? For the glory of MediaWiki of course Because it is the most interesting way, and as mentioned in Manual:Wiki family "...it can give really good, clean results." Disclaimer: I don't know what I'm doing. I'm woefully inexperienced with Unix-like operating systems and probably shouldn't touch them without a 10-foot pole. You are advised to be cautious and verify before following any steps below.

CommonSettings.php
This file contains all the shared wiki settings. General groups that every wiki should have (such as a rollback group), things like an emergency email address etc. Here, you can also add a listing for extensions, such as the example below. Additionally, you may include this in a separate file, such as LocalExtensions.php, or equivalent.

Example
wfLoadExtensions('CentralAuth'); if ($wgUseMediaWikiChat) { wfLoadExtensions('MediaWikiChat'); }
 * 1) Extensions enabled on all wikis

InitialiseSettings.php
Here, the $wgConf gets created and filled.

LocalSettings.php
You'll need several modifications to LocalSettings.php:

Database name determiner
This part figures out which database to obtain. This becomes imported later on when $wgConf needs a database name to get the site specific settings.

MediaWiki.org

 * Manual:Wiki family
 * Manual:$wgConf
 * Manual:CommonSettings.php
 * Manual:InitialiseSettings.php

Bundled MediaWiki documentation

 * SiteConfiguration.php

Actual examples

 * Miraheze's Github Repository - A setup incredibly similar to the one used by Wikimedia, running the latest stable version with CentralAuth. Production configuration is available in their mw-config repository
 * Wikimedia's CommonSettings.php
 * Wikimedia's InitialiseSettings.php
 * Wikimedia's wgConf.php