Cookies helfen uns bei der Bereitstellung des IMT HilfeWikis. Bei der Nutzung vom IMT HilfeWiki werden die in der Datenschutzerklärung beschriebenen Cookies gespeichert.Weitere Informationen


IMT HilfeWiki - das Wiki
Wechseln zu:Navigation, Suche

Update mediawiki core

Remember your file layout looks like this:

drwxr-xr-x  8 www-data www-data 4096 Feb 18 12:43 .git                           // your repository files
-rw-r--r--  1 www-data www-data  362 Feb 18 12:06 .gitignore                     // ignore files for your repo
-rw-------  1 www-data www-data   58 Oct 21 17:11 _admin_login.php               // located in this file are the credentials for the local admin login
drwxr-xr-x  2 www-data www-data 4096 Feb 18 12:06 _config                        // this is where your config files are located
drwxr-xr-x 51 www-data www-data 4096 Feb 18 12:41 _extensions                    // this is the assortment of available extensions
drwxr-xr-x  3 www-data www-data 4096 Dec 16 09:58 _images                        // this is your image directory, almost empty after unpacking
drwxr-xr-x  5 www-data www-data 4096 Feb 17 12:39 _init                          // this is where all starter files and some useful scripts are located
-rwx------  1 www-data www-data  593 Oct 21 17:11 get_new_version_going          // a small script to initialize a new version (update, not upgrade) of the mediawiki software
lrwxrwxrwx  1 www-data www-data   16 Feb 18 12:40 mediawiki -> mediawiki-1.23.8  // a symbolic link to the current mediawiki core software
drwxr-xr-x 12 www-data www-data 4096 Feb 18 12:39 mediawiki-1.23.8               // the current mediawiki core software
drwxr-xr-x  2 www-data www-data 4096 Oct 23 13:04 php_temp                       // folder for temporary files and session data

In this example the core software runs on version 1.23.5. Identify your new version number and execute these to commands (in this example we upgrade to 1.23.42):

tar xvzf mediawiki-1.23.42.tar.gz

You should have a new directory called mediawiki-1.23.42 in the above listing. Now cd in it and run


After that all you have to do is remove the symbolic link pointing to your old core software and create a new one pointing to mediawiki-1.23.42.

You should also run update.php after each upgrade:

php mediawiki/maintenance/update.php

Update extensions

The extensions are located in ./_extensions. Most of them have a directory indicating their version number and a symbolic link pointing to them. Something like:

lrwxrwxrwx  1 www-data www-data   16 Oct 12 21:56 ApprovedRevs -> ApprovedRevs.0.7
drwxr-xr-x  5 www-data www-data 4096 Oct 12 21:54 ApprovedRevs.0.7
lrwxrwxrwx  1 www-data www-data   19 Aug 22 14:37 Arrays -> Arrays.2.0rc3_alpha
drwxr-xr-x  3 www-data www-data 4096 Aug 22 14:36 Arrays.2.0rc3_alpha

When there is a new version just unpack it here, be sure to include ne new version number in the directory name and let the symbolic link point to the new directory (mind the user and directory rights in the newly downloaded extension and run chown if needed).

As ususual you should run update.php after each update:

php mediawiki/maintenance/update.php

Extension w/o version numbers are most likely either installed by composer or downloaded via git:


Some extensions are installed via composer. Namely:

  • lingo
  • semantic-extra-special-properties
  • semantic-glossary
  • semantic-media-wiki
  • semantic-result-formats

You can find an actual overview of all composer installed extensions in the file ./mediawiki/composer.json. With a fresh install of this platform it should look like this:

    "require": {
        "mediawiki/semantic-media-wiki": "~2.0",
        "mediawiki/semantic-extra-special-properties": "*",
        "mediawiki/lingo": "*",
        "mediawiki/semantic-result-formats": "*",
        "mediawiki/semantic-glossary": "*"

Go to your mw core root directory and hit composer update. Your composer installed extensions should update automatically.


To play it safe either note the commit you're running the extension on or backup the directory. Then hit git pull.

Maintenance scripts

You should run them regularely, either by hand or as recommenden by cron:

  • mediawiki/maintenance/runJobs.php to clean the job queue on a daily or hourly basis (please consider specifying a parameter --maxjobs 1000)
  • _extensions/SemanticMediaWiki/maintenance/rebuildData.php to rebuild the smw store. probably once per week or month so:
    • php rebuildData.php -ftp -d 20, to clear the store (thus removing false entries) and rebuild the properties and after that a couple of times
    • php rebuildData.php -d 20, to rebuild the new data
  • _extensions/SemanticGlossary/maintenance/rebuildGlossaryCache.php to rebuild the semantic glossary cache. probably once per week or month so:

Remember to set an environment variable with the mediawiki working directory:

export MW_INSTALL_PATH=/var/www/<wikiname>/mediawiki

Clean up session files

You should also clean up all session files, located ./php_temp. Best do this with a cron job.