Extension:Simple Farm

Simple Farm is a simple MediaWiki farm extension by Daniel Werner. It automatically forwards to a certain wiki (within one single MediaWiki installation) that should be accessed by either a virtual script path (using a tiny bit of mod-rewrite) or by using sub-domains. It is also possible to have members of the same farm using either of these methods, not all members have to use the same. Furthermore, 'Simple Farm' comes with a maintenance script which allows to maintain several farm members at the same time, e.g. doing database updates for all or certain farm members by executing just one command.

How it Works
Simple Farm kicks in before the MediaWiki has initialized all of its components. At this stage the wiki has not even made a connection to its database, global variables and functions are not all initialized, just most Extensions might be registered already. At this stage, Simple Farm takes over initialization to load a wiki from a certain database and set required global configuration variables accordingly. After that job is done, it is even possible to load further global settings according to one farm members specific needs.

Basically the same happens in Maintenance mode via command-line. There is one script which will take commands which should be executed for each or just some specific farm members. Then the script will connect to one wiki to have Mediawikis maintenance functionality available, from there it will handle the commands for each farm member wikis independently.