MediaWiki logo As you probably know by now, MediaWiki has received a scheduled quarterly update, v1.10.0, about two weeks ago. Release notes are available at MediaWiki's website - it's mostly bug fixes, some new features and configuration changes.

So if you haven't upgraded your 1.9.x installation to the latest and greatest yet, here is a run-down of the major steps.

N.B. This guide assumes you're running MediaWiki 1.9.x on a Linux/BSD server powered by PHP 5.x and MySQL 5.x. It may work for other systems as well but proceed with caution. If you have no access to PHP's executable on your server, consult advanced upgrade instructions available at MediaWiki.org.

  1. First you're strongly advised to backup your database and create a copy of MediaWiki installation. Run the following commands in your webserver's root directory:

    # mysqldump -u user_name [-h host_name] -p db_name > backup.sql
    

    This will dump the contents of a db_name database into the backup.sql file

    # tar zcvf backup.tar.gz *
    

    The command above creates the gzip'ed archive of all the files inside your current directory (assuming you are still in your webroot folder).

    # tar zcvf preserve.tar.gz LocalSettings.php AdminSettings.php extensions/ images/ skins/
    

    And this one makes a duplicate of any custom files including settings, installed extensions, uploaded files and modified skins.

    MediaWiki's manual also suggests dumping your pages in XML format using the command-line tool dumbBackup.php located in maintenance/ directory (for this step you need to have an executable version of PHP available on your server):

    # /path/to/php ./maintenance/dumpBackup.php --full > dump.xml
    

    For a list of available options and their descriptions, run dumpBackup.php without parameters.

  2. Move the files created in previous step to a different directory (or on another machine):

    # mv backup.tar.gz preserve.tar.gz backup.sql dump.xml /path/to/some/other/folder
    
  3. Download and unpack MediaWiki's new version:

    # wget http://download.wikimedia.org/mediawiki/1.10/mediawiki-1.10.0.tar.gz
    # tar zxvf mediawiki-0.10.0.tar.gz
    
  4. Copy its contents overwriting your current version (make sure you're still in your webroot):

    # cp mediawiki-0.10.0/* .
    
  5. Run the update script:

    # /path/to/php ./maintenance/update.php
    MediaWiki 1.10.0 Updater
    
    
    Going to run database updates for <var>db_name</var>-<db_prefix>_
    Depending on the size of your database this may take a while!
    Abort with control-c in the next five seconds...5
    

Hopefully, this should run without any errors ending with "Done." message - which means you now have an upgraded MediaWiki v1.10.0, congratulations! Verify this by going to http://www.yoursite.com/index.php?title=Special:Version.