IT Systems Engineering

my mediawiki upgrade procedure to ver 1.8

Here is how I upgraded from mediawiki version 1.5 to 1.8.

First follow the instructions on this page.

Check requirements:

  • PHP version

To find PHP version, I created a small file on the server. Called it phpinfo.php. Pasted this code in it:

<?php phpinfo() ?>

When called within a web browser it displays useful info about PHP on the server. I got : PHP Version 5.3.2-1ubuntu4.14. so I am good here

  • My SQL version

Using webmin I can see that mysql is version 5.1.61. All set here too.


To backup the database, I used webmin’s Mysql module

To backup the file system I used this command on a shell

tar cvzf mediawiki.tar.gz /var/www/mediawiki

Delete old wiki files

This is something which I did but was not mentioned in the official upgrade procedure. I figured it will keep the install clean.

Delete the old files and directories except:

  1. the extensions/ directory
  2. the images/ directory
  3. any other directory where files have been uploaded [I had two other]
  4. the .htaccess file [there was none in my old install]
  5. the AdminSettings.php file [there was none in my old install]
  6. the LocalSettings.php file

It was easily done using webmin’s file manager. I can select multiple files by holding down control key and delete them.

Unpack new files

  1. I download version 1.8 and uploaded to /var/www/mediawikinew using webmin [clean location]
  2. I let webmin I extract the tar file during upload.

 Then I used webmin to cut and paste the contents of the uploaded directory to the mediawiki directory.

I ran into problems here. File manager complained that two directories were already there [images and extensions] and wont overwrite them.

 Since the new images folder has nothing in it. I ignore that problem.

I renamed the old extensions folder to extensions_old and copied over the new extensions folder.

Correct file permisions

After copying the stuff we need to make sure every folder under mediawiki has the correct permissions. Make everything writable by user and group called “www-data”


Copy over the extensions

 I copied the old extensions

  1. Flash.php
  2. flashonweb.php
  3. embed_document.php
  4. LdapAuthentication.php
  5. /extensions/EmbeddedVideo
  6. /extensions/spellcheck

Commented out FCK editor by editing the localsettings.php file in mediawiki directory

# enabling FCK editor:
# require_once("$IP/extensions/FCKeditor/FCKeditor.php");
# $wgUseAjax = 'true';

 temporarily change user permissions

Since Apache runs as www-data and ‘maybe’ the user account you are using ‘admin’ to run these scripts does not belong to www-data group… you will get errors while running the scripts in the next section. especially while running the refreshlinks.php. That script creates sub directories under images. I was getting an error and found out how to solve it here.

To solve this issue… add www-data group to your admin account temporarily. After running the scripts you can revert this change back.

Run the update script

From a putty session to the server I ran the commands:

cd /var/www/mediawiki/maintenance
php update.php
php refreshLinks.php

Correct file permisions again

While running the refreshlinks.php command some directories are created under the admin account. So lets change the permissions to make everything writable by user and group called “www-data” one more time.

upgrade extensions

We are using these extensions:

  • Flash.php
  • flashonweb.php
  • embed_document.php
  • LdapAuthentication.php
  • /extensions/EmbeddedVideo
  • /extensions/spellcheck

TO DO: Need to find out the latest versions of these and update them


TESTING the WYSIWYG editor : wikiEditor

Installation instructions are here

Leave a Reply

Your email address will not be published. Required fields are marked *

Prove that you are a human *