From Forge

Revision as of 03:14, 11 March 2011 by (Talk)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

We're currently running stock MediaWiki. However, we're exploring using the Wikia version, which has a nice rich text editor.



There are some decent, but incomplete hints hints on how to start a MediaWiki farm, including a template for setting up a Drupal-style farm. I used this template.

The basic idea is:

  1. Set up a good directory structure with the appropriate mappings of sites to directories.
  2. Install an instance of MediaWiki. This creates your initial database and a site-specific LocalSettings.php.
  3. Move the LocalSettings.php to the appropriate site directory.
  4. Use a Drupal-style LocalSettings.php in the main directory. This will find the appropriate config for each site, and it also allows you to configure some default settings for all sites.

The directory structure I'm using is:


code is a symbolic link to the code. The sites subdirectories follow the Drupal convention for expressing domains and paths. Note that you need both a *.wiki and a *.w directory in order to enable Short URLs. I make one a symlink to the other.

Actually getting the Wikis installed is tricky and requires a bit of bootstrapping. I first pointed a domain at /var/www/mediawiki/code and ran through MediaWiki's default installation process. This gave me a LocalSettings.php file that I could customize per site and it populated the MySQL database, w_blueoxen. I then edited and moved LocalSettings.php to the appropriate sites directory and installed the Drupal-style configuration file. Things to change:

$IP = "/var/www/mediawiki/code";

$wgScriptPath = "/path/URL";

In order to install other Wikis, I disable the main LocalSettings.php, access the desired URL, run through installation/configuration again, then modify the files accordingly. The only thing this really buys me is populating the database, as I could easily install a custom LocalSettings.php file without going through the default setup.

Group Access Control

MediaWiki defines several groups by default: * (all users), user (registered users), etc. You can define new groups in LocalSettings.php and add users to those groups through Special:Userrights.

If you want to setup a private Wiki that only a certain set of people can edit, define a new group (e.g. newgroup):

$wgGroupPermissions['*']['read'] = false;
#$wgGroupPermissions['user']['read'] = false;
$wgWhitelistRead = array ("Special:Userlogin", "MediaWiki:Common.css", "MediaWi$

# Disable anonymous editing
$wgGroupPermissions['*']['edit'] = false;

# Prevent new user registrations except by sysops
$wgGroupPermissions['*']['createaccount'] = false;

$wgGroupPermissions['newgroup']['read'] = true;
$wgGroupPermissions['newgroup']['edit'] = true;

Note that $wgGroupPermissions['user']['read'] is commented out. This is so that you can log in and access Special:Userrights. Once you have added yourself to newgroup, you can uncomment it.


My farm uses a shared user table by setting $wgSharedDB to "w_blueoxen" and $wgSharedPrefix to "blueoxen_" in the main LocalSettings.php. What this does is force all installations to use the users table for the blueoxen (collaboratories) Wiki installation.

Per-site configuration:

To Do

  • Installed OpenID extension. I'm having some weird trouble with the OpenID extension. If I login with my XRI, it fails the first time, but succeeds the second. Also, I can't seem to access my user page.
  • Disable anonymous editing?
  • Installed clean skin, then removed it. Need a better understanding of how MediaWiki Skins work. Would be good to remove $wgDefaultSkin entry from the site-specific LocalSettings.php.
  • Create a usable skin.
  • Install fckeditor. Wait for Wikia version to come out; it's much better.
  • Use MediaWiki's access control capabilities to protect private Wikis (rather than .htdigest).
  • JSBreadCrumbs extension
  • Countdown extension
  • ConfirmAccount extension


Personal tools