Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

ProleWiki:Maintenance/Updating MediaWiki: Difference between revisions

From ProleWiki, the proletarian encyclopedia
More languages
(Added step by step update process)
Tag: Visual edit
m (Added info on languageSelector.php)
Tag: Visual edit
 
(2 intermediate revisions by the same user not shown)
Line 7: Line 7:
===Step 2: Download the tarball===
===Step 2: Download the tarball===
Go to the webroot directory<ref group="lower-alpha">Where <code>LocalSettings.php</code> is located</ref> and download the tarball of the new MediaWiki release:
Go to the webroot directory<ref group="lower-alpha">Where <code>LocalSettings.php</code> is located</ref> and download the tarball of the new MediaWiki release:
  wget <nowiki>https://</nowiki>releases.wikimedia.org/mediawiki/1.39/mediawiki-1.39.1.tar.gz
  wget [https://releases.wikimedia.org/mediawiki/1.40/mediawiki-1.40.0 <nowiki>https://</nowiki>releases.wikimedia.org/mediawiki/1.40/mediawiki-1.40.0].tar.gz
And extract them:
And extract them:
  tar -xvf mediawiki-1.39.1.tar.gz
  tar -xvf mediawiki-1.40.0.tar.gz


=== Step 3: Move folders ===
=== Step 3: Move folders and files ===
Move all folders except <code>uploads/</code><ref group="lower-alpha">Where all uploads are stored</ref> (where all uploads are stored) and <code>resources/assets/</code>.<ref group="lower-alpha">Where all multi-language logos are stored</ref> Move all folders from <code>mediawiki-1.39.1/</code> to the webroot, you may have to manually move each folder from <code>mediawiki-1.39.1/resources/</code>  
The following folders and files should be preserved:
 
* <code>uploads/</code><ref group="lower-alpha">Where all uploads are stored</ref> (where all uploads are stored)  
* <code>resources/assets/</code><ref group="lower-alpha">Where all multi-language logos are stored</ref>
* <code>skins/Citizen/</code>
* <code>languageSelector.php</code> (it's what produces [https://prolewiki.org prolewiki.org])


=== Step 4: Update extensions and databases ===
=== Step 4: Update extensions and databases ===
Run this code inside the webroot to update a few extensions and save some work:
Run this code inside the webroot to update a few extensions and save some work:
  php composer.phar update
  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:
Full list of extensions (some of them bundled with MediaWiki):
AbuseFilter [BUNDLED]
CategoryTree [BUNDLED]
Cite [BUNDLED]
CiteThisPage [BUNDLED]
CodeEditor [BUNDLED]
  CodeMirror
  CodeMirror
  ConfirmAccount
  ConfirmAccount
ConfirmEdit [BUNDLED]
  ContentTranslation
  ContentTranslation
  ContributionScores
  ContributionScores
Line 25: Line 36:
  CSS
  CSS
  Discord
  Discord
DiscussionTools [BUNDLED]
  DismissableSiteNotice
  DismissableSiteNotice
  Echo
  Echo [BUNDLED]
  EmbedVideo
  EmbedVideo
  ExternalData
  ExternalData
  Flow
  Flow
Gadgets [BUNDLED]
HitCounters
ImageMap [BUNDLED]
InputBox [BUNDLED]
Interwiki [BUNDLED]
Linter [BUNDLED]
LoginNotify [BUNDLED]
  MassEditRegex
  MassEditRegex
Math [BUNDLED]
  Matomo<ref group="lower-alpha">Matomo as of 2023 requires [https://github.com/DaSchTour/matomo-mediawiki-extension/pull/40 manual intervention]</ref>
  Matomo<ref group="lower-alpha">Matomo as of 2023 requires [https://github.com/DaSchTour/matomo-mediawiki-extension/pull/40 manual intervention]</ref>
  MobileFrontend
  MobileFrontend
MultimediaViewer [BUNDLED]
Nuke [BUNDLED]
OATHAuth [BUNDLED]
  OpenGraphMeta
  OpenGraphMeta
PageImages [BUNDLED]
ParserFunctions [BUNDLED]
PdfHandler [BUNDLED]
Poem [BUNDLED]
  Popups
  Popups
Renameuser
ReplaceText [BUNDLED]
  SandboxLink
  SandboxLink
Scribunto [BUNDLED]
SecureLinkFixer [BUNDLED]
SpamBlacklist [BUNDLED]
SyntaxHighlight_GeSHi [BUNDLED]
TemplateData [BUNDLED]
  TemplateStyles
  TemplateStyles
  Thanks
TextExtracts [BUNDLED]
  Thanks [BUNDLED]
  TimedMediaHandler
  TimedMediaHandler
TitleBlacklist [BUNDLED]
VisualEditor [BUNDLED]
  Wikibase
  Wikibase
WikiEditor [BUNDLED]
WikiSEO
Once they are all installed, go to <code>maintenance/</code> and run  
Once they are all installed, go to <code>maintenance/</code> and run  
  php update.php --wiki de --quick
  php update.php --wiki de --quick

Latest revision as of 13:51, 15 July 2023

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.40/mediawiki-1.40.0.tar.gz

And extract them:

tar -xvf mediawiki-1.40.0.tar.gz

Step 3: Move folders and files

The following folders and files should be preserved:

  • uploads/[b] (where all uploads are stored)
  • resources/assets/[c]
  • skins/Citizen/
  • languageSelector.php (it's what produces prolewiki.org)

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

Full list of extensions (some of them bundled with MediaWiki):

AbuseFilter [BUNDLED]
CategoryTree [BUNDLED]
Cite [BUNDLED]
CiteThisPage [BUNDLED]
CodeEditor [BUNDLED]
CodeMirror
ConfirmAccount
ConfirmEdit [BUNDLED]
ContentTranslation
ContributionScores
CreatedPagesList
CSS
Discord
DiscussionTools [BUNDLED]
DismissableSiteNotice
Echo [BUNDLED]
EmbedVideo
ExternalData
Flow
Gadgets [BUNDLED]
HitCounters
ImageMap [BUNDLED]
InputBox [BUNDLED]
Interwiki [BUNDLED]
Linter [BUNDLED]
LoginNotify [BUNDLED]
MassEditRegex
Math [BUNDLED]
Matomo[d]
MobileFrontend
MultimediaViewer [BUNDLED]
Nuke [BUNDLED]
OATHAuth [BUNDLED]
OpenGraphMeta
PageImages [BUNDLED]
ParserFunctions [BUNDLED]
PdfHandler [BUNDLED]
Poem [BUNDLED]
Popups
Renameuser
ReplaceText [BUNDLED]
SandboxLink
Scribunto [BUNDLED]
SecureLinkFixer [BUNDLED]
SpamBlacklist [BUNDLED]
SyntaxHighlight_GeSHi [BUNDLED]
TemplateData [BUNDLED]
TemplateStyles
TextExtracts [BUNDLED]
Thanks [BUNDLED]
TimedMediaHandler
TitleBlacklist [BUNDLED]
VisualEditor [BUNDLED]
Wikibase
WikiEditor [BUNDLED]
WikiSEO

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