Jump to content

Maintaining a wiki

From mediawiki.org

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 #mediawiki connect for help.
    • If you still can't find what you needā€¦
    • 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 ?uselang=qqx 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 nstab-user 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.