Upgrading MediaWiki
From Blitzed
This page serves as a small guide on how to upgrade MediaWiki to a new upstream version.
Before upgrading the live wiki, please try to upgrade a test install first!
We're currently using CVS to install the wiki from, to make upgrading it easier. Instructions to upgrade it using a tarball release are still provided, but shouldn't be used.
Contents |
[edit] CVS release upgrade
An upgrade of an already checked out CVS tree (which has been provided during the install) is simple:
$ cd /var/www/wiki.blitzed.org/wiki/ # cvs update
This will fetch all updates files from the CVS tree (REL1_3), and automatically try to merge any changes. Because our customizations are already present in the old files, they will get merged. This may fail, however, and therefore this chould be checked and fixed rightaway (preferably in the test install!).
[edit] Tarball release upgrade
[edit] Extract the files
Untar the files in a temporary directory:
$ tar -zxvf path/to/mediawiki.tar.gz
[edit] Apply the Blitzed patch
We had to make some changes to MediaWiki in order to support Blitzed specific things, like authentication through services. These changes are maintained as a patch against MediaWiki. From the mediawiki installation directory, run the command:
$ patch -p0 < /path/to/patch
and check whether there are no rejects. If there are rejects, files will need to be edited manually, and a new patch against the latest MediaWiki version should be made for easier installation of newer versions.
[edit] Copy the files
Make a backup copy in case things go wrong, and copy (overwrite) the old files from the newly patched files from the installation directory:
# cd /data/www/wiki.blitzed.org # cp -R wiki wiki.bak # cp -R /path/to/install/mediawiki/* wiki/
This should hopefully only overwrite files from the stock install.
[edit] Database updates
The database schema might have changed since the last MediaWiki version, or the content of the database may need conversion. There is an automatic upgrade script in maintenance/update.php that attempts to do any database conversions needed. It requires a properly setup AdminSettings.php with a MySQL account that might require wider grants than the MySQL account used by the wiki itself.
In any case, backup the database first!
[edit] Math support
The wiki/math directory contains programs for rendering pretty math formulas in the wiki. They need to be compiled seperately.
On nubian, dvips seems to have problems with texvc's command line parameters: it doesn't recognize 'ps:-' as an input filename specifier for stdin. Change this line to use plain '-' in file render.ml:
let cmd_convert finalpath = "/usr/local/bin/convert -quality 100 -density 120 - " ^ finalpath ^ " >/dev/null 2>/dev/null"
Run a gmake in this directory to force a recompile.