MediaWiki
Minor release
A small patch file is usually made available for a minor version upgrade. Download and extract the patch files.
- Make a backup of the MediaWiki directory.
cp -vr /srv/www/scoutwiki/htdocs-1.39 /srv/www/scoutwiki/htdocs-1.39.5
- Change to the MediaWiki directory.
cd /srv/www/scoutwiki/htdocs-1.39
- Download the patch file and gunzip it.
wget http://releases.wikimedia.org/mediawiki/1.39/mediawiki-1.39.6.patch.gz
gunzip mediawiki-1.39.6.patch.gz
- Use
patch -p1 --dry-run
to check what will be changedpatch -p1 --dry-run < mediawiki-1.39.6.patch
- If all is well, run patch again without
--dry-run
.patch -p1 < mediawiki-1.39.6.patch
- Check the Special:Version on all ScoutWiki's and you should see the new version number in place.
Major release
- Go to the directory with web files
cd /srv/www/scoutwiki/
- backup the database
- (to be added)
- Download the release file and untar it.
wget https://releases.wikimedia.org/mediawiki/1.40/mediawiki-core-1.40.0.tar.gz
tar vxfz mediawiki-core-1.40.0.tar.gz
- Rename the new installation directory
mv -v mediawiki-1.40.0 htdocs-1.40
- Change or add some subdirectories and copy some files from the old to the new installation directory
cd htdocs-1.40
mv skins skins.old
ln -s ../skins-1.40 skins
mv extensions extensions.old
ln -s ../extensions-1.40 extensions
ln -s ../sites sites
cp -v ../htdocs-1.39/composer.local.json ./
cp -v ../htdocs-1.39/LocalSettings.php ./
cp -r ../htdocs-1.39/srv ./
cp -v ../htdocs-1.39/*.sh ./
cp -v ../htdocs-1.39/composer.phar ./
- Run composer on the new installation directory
php /srv/www/scoutwiki/htdocs/composer.phar update --no-dev
- Link the MediaWiki web root to the new installation directory
rm -i ../htdocs; ln -s ../htdocs-1.40 ../htdocs
- Check the ScoutWiki's, they most likely give some database error, not a blank screen or "can't find LocalSettings.php"
- 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.
- 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_39
Composer maintained extensions
Run composer in /srv/www/scoutwiki/htdocs
only use php composer.phar
. So to update the extensions that are maintained with composer run php /srv/www/scoutwiki/htdocs/composer.phar update --no-dev
Hacks
extensions/Wikibase/client/includes/Hooks/LangLinkHandler.php
public function getInterwikiCodeFromSite( Site $site ) { // FIXME: We should use $site->getInterwikiIds, but the interwiki ids in // the sites table are wrong currently, see T137537. // $id = $site->getGlobalId(); // $id = preg_replace( '/(wiki\w*|wiktionary)$/', '', $id ); // $id = strtr( $id, [ '_' => '-' ] ); $id = $site->getInterwikiIds()[0]; if ( !$id ) { $id = $site->getLanguageCode(); } return $id; }