ProleWiki:Maintenance/Updating MediaWiki

From ProleWiki, the proletarian encyclopedia
Revision as of 05:44, 20 January 2023 by Forte (talk | contribs) (Added step by step update process)

This is a page for a step-by-step tutorial on updating the MediaWiki, for future reference.

Step 1: Backup everything

ProleWiki already has a rudimentary and simple backup system, thanks to comrade MxAsh. We have the backup of the all files in another server.

Step 2: Download the tarball

Go to the webroot directory[a] and download the tarball of the new MediaWiki release:

wget https://releases.wikimedia.org/mediawiki/1.39/mediawiki-1.39.1.tar.gz

And extract them:

tar -xvf mediawiki-1.39.1.tar.gz

Step 3: Move folders

Move all folders except uploads/[b] (where all uploads are stored) and resources/assets/.[c] Move all folders from mediawiki-1.39.1/ to the webroot, you may have to manually move each folder from mediawiki-1.39.1/resources/

Step 4: Update extensions and databases

Run this code inside the webroot to update a few extensions and save some work:

php composer.phar update

Unfortunately, not all extensions we use are able to be updated through this method. The following templates have to be installed manually:

CodeMirror
ConfirmAccount
ContentTranslation
ContributionScores
CreatedPagesList
CSS
Discord
DismissableSiteNotice
Echo
EmbedVideo
ExternalData
Flow
MassEditRegex
Matomo[d]
MobileFrontend
OpenGraphMeta
Popups
SandboxLink
TemplateStyles
Thanks
TimedMediaHandler
Wikibase

Once they are all installed, go to maintenance/ and run

php update.php --wiki de --quick
php update.php --wiki en --quick
php update.php --wiki es --quick
php update.php --wiki fr --quick
php update.php --wiki pt --quick
php update.php --wiki ru --quick
php update.php --wiki zh --quick

Notes

  1. Where LocalSettings.php is located
  2. Where all uploads are stored
  3. Where all multi-language logos are stored
  4. Matomo as of 2023 requires manual intervention