Maintaining a wiki

This document covers the things to consider when you are maintaining your own MediaWiki installation.

These should be considered best practices for maintaining your own wiki.


 * Use a VCS
 * Put unmodified, upstream code (i.e. MediaWiki and any extensions) in a separate branch.
 * Only keep code in the VCS.
 * Your VCS is not the right place to put all your uploaded files.
 * Any log files that appear under your MediaWiki root shouldn't end up in your VCS.
 * Create a deploy script.
 * This should get the production (or testing) branch from your VCS, merge the different branches, and push it to production.
 * Should complain loudly or even halt if there are un-versioned changes.
 * Don't modify the MediaWiki source
 * Use Hooks
 * Check the manual for available hooks.
 * If you don't see what you need, try asking on IRC in for help.
 * If you still can't find what you need…
 * add a hook.
 * Typically this means adding a single line of code.
 * If you do this, file a bug and upload your patch in Gerrit. Don't forget to update documentation; see Manual:Hooks.
 * Use LocalSettings.php for configuration changes — don't modify DefaultSettings.php.
 * Keep a separate file for private information, like database passwords.
 * Use the MediaWiki namespace.
 * Much of the appearance of MediaWiki can be modified this way.
 * Add  to the URL to find out which pages to modify.
 * Adding uselang=qqx to a user page will show that the “User page” tab at the top uses the  token to find the string to display.
 * Modifying MediaWiki:nstab-user will change the text that is displayed.
 * If you need to provide different strings based on the User's language, then have a look at the gadget description templates on Commons.
 * Don't use message strings, instead use keys and Localisation — maybe point to coding guidelines
 * Try to use extensions that Wikimedia uses.
 * Avoid extensions that are out of date or un-maintained.