The ScoutWiki Network server was upgraded on November 20th, 2019. The maintenance is now over. Please inform us in Slack or via email support@scoutwiki.org if you encounter any unexpected errors – it's possible the upgrade has missed something. Thanks and happy scoutwiki'ng!

MediaWiki upgrade

From ScoutWiki Network
Jump to navigation Jump to search

MediaWiki

Minor release

Upgrading using patch

A small patch file is usually made available for a minor version upgrade. Download and extract the patch files.

  1. Make a backup of the MediaWiki directory.
    • cp -vr /srv/www/scoutwiki/htdocs-1.33 /srv/www/scoutwiki/htdocs-1.33.2
  2. Change to the MediaWiki directory.
    • cd /srv/www/scoutwiki/htdocs-1.33
  3. Download the patch file and gunzip it.
  4. Use patch -p1 --dry-run to check what will be changed
    • patch -p1 --dry-run < mediawiki-1.33.3.patch
  5. If all is well, run patch again without --dry-run.
    • patch -p1 < mediawiki-1.33.3.patch
  6. Check the Special:Version on all ScoutWiki's and you should see the new version number in place.

Major release

  1. Go to the directory with web files
    • cd /srv/www/scoutwiki/
  2. backup the database
    • (to be added)
  3. Download the release file and untar it.
  4. Rename the new installation directory
    • mv -v mediawiki-1.34.0 htdocs-1.34
  5. Change or add some subdirectories and copy some files from the old to the new installation directory
    • cd htdocs-1.34
    • cp -vr ../htdocs-1.33/skins/common skins
    • cp -vr ../htdocs-1.33/skins/scoutwiki skins
    • mv extensions extensions.old
    • ln -s ../extensions extensions
    • ln -s ../sites sites
    • cp -v ../htdocs-1.33/.[^.]* ./
    • cp -v ../htdocs-1.33/LocalSettings.php ./
    • cp -r ../htdocs-1.33/srv ./
    • cp -v ../htdocs-1.33/*.sh ./
    • cp -v ../htdocs-1.33/composer ./
  6. Run composer on the new installation directory
    • ./composer require "mediawiki/bootstrap:~1.0"
    • ./composer update --no-dev
  7. Link the MediaWiki web root to the new installation directory
    • rm -i ../htdocs; ln -s ../htdocs-1.34 ../htdocs
  8. Check the ScoutWiki's, they most likely give some database error, not a blank screen or "can't find LocalSettings.php"
  9. Run the update script for each ScoutWiki. Going from small to big.
    • ./update.sh xx, xx is the language code, include asso and media
    • Check the ScoutWiki, it should work again.
  10. Update the extensions

Extensions

A list of all the mediawiki_extensions on the ScoutWiki's including ES and HU.

Git maintained extensions

To update the extensions run ./update.sh in /srv/www/scoutwiki/extensions/

Most extensions follow the "Release" branch when available otherwise the "Master" branch.

git checkout REL1_33

Composer maintained extensions

Run composer in /srv/www/scoutwiki/composer only use ./composer.sh instead of php composer.phar. So to update the extensions that are maintained with composer run ./composer.sh update

Other extensions

Customizations

Non-standard language/other side bar links

There may be a time when you want your interwiki links to appear in the siderbar, instead of in-text. To achieve this, simply add the interwiki prefix and the name of the site to /languages/data/Names.php, in the same format as the languages already there:

'iw_prefix' => 'Description of language/site',

for example:

'scout-o-wiki' => 'scout-o-wiki',

Make sure the last line has no comma, and the second last line has one, and make sure your interwiki prefix is not not duplicating an existing language!