Mediawiki 1.43 upgrade
Apparence
Environment
- Ubuntu ARM 20.04
- NGINX with PHP-FPM
Install the version 1.43
wget https://releases.wikimedia.org/mediawiki/1.43/mediawiki-1.43.0.tar.gz
tar xf mediawiki-1.43.0.tar.gz
sudo mv mediawiki-1.43.0 /var/www
cd /var/www/mediawiki-1.43.0
sudo cp -r images images-kiwi
sudo cp -r cache cache-kiwi
sudo cp -r ../mediawiki/images/. images
sudo cp -r ../mediawiki/images-kiwi/. images-kiwi
# copy the LocalSettings
sudo cp ../mediawiki/LocalSettings* .
# copy the non-native extensions
cd ../mediawiki/extensions
sudo cp -r ContactPage CustomTags Highlightjs_Integration NativeSvgHandler SimpleMathJax SummaryPage ../../mediawiki-1.43.0/extensions
cd mediawiki/resources/assets
sudo rm change-your-logo.svg change-your-logo-icon.svg poweredby_mediawiki_*.png wiki.png
sudo cp arch-logo.svg banane.ico hljs-88x31.png kiwi.ico odroid.svg piwiklogo.png poweredby_mediawiki.svg wiki.png ../../../mediawiki-1.43.0/resources/assets/
# update the owner
cd mediawiki-1.43.0
sudo chown -R root:root .
sudo chown -R www-data:www-data cache/ cache-kiwi/ images/ images-kiwi/ LocalSettings*
|
Duplicate and upgrade the databases
# dump the databases
sudo mariadb-dump -x -e -B wiki -r wiki.sql
sudo mariadb-dump -x -e -B kiwi -r kiwi.sql
# edit the wiki.sql and kiwi.sql file to change the database name to wiki143 and kiwi143
|
# restore the dump in the new databases
source wiki.sql
source kiwi.sql
# give the already existing users all the rights to the new databases
grant all on wiki143.* to 'wiki'@'localhost'
grant all on kiwi143.* to 'kiwi'@'localhost'
|
# upgrade the database
cd /var/www/mediawiki
sudo -u www-data php maintenance/update.php --conf LocalSettings-wiki.php
sudo -u www-data php maintenance/update.php --conf LocalSettings-kiwi.php
|
# give the already existing users only the necessary rights to the new databases
grant index, create, select, insert, update, delete, alter, lock tables on wiki143.* to 'wiki'@'localhost'
grant index, create, select, insert, update, delete, alter, lock tables on kiwi143.* to 'kiwi'@'localhost'
|
Remove unnecessary folders
# documentation
sudo rm -rf docs
# test files
sudo rm -rf tests
# unused skins
cd skins
sudo rm -rf MinervaNeue MonoBook Timeless
# other sql providers
sudo rm -rf maintenance/postgres maintenance/sqlite extensions/Math/sql/postgres extensions/Math/sql/sqlite
# unused extensions
cd extensions
sudo rm -rf AbuseFilter CategoryTree Cite CiteThisPage ConfirmEdit DiscussionTools Echo Gadgets ImageMap InputBox Interwiki Linter Nuke OATHAuth PageImages ParserFunctions PdfHandler Poem Scribunto SecureLinkFixer SpamBlacklist SyntaxHighlight_GeSHi TemplateData TextExtracts Thanks TitleBlacklist VisualEditor
# lang
setopt extended_glob
cd languages/i18n
sudo rm -- ^(en|fr).json
cd languages/i18n/exif
sudo rm -- ^(en|fr).json
|
Name | Description | Keep |
---|---|---|
AbuseFilter | Allows specific behavior-based restrictions to be placed on wiki activity | |
CategoryTree | Provides a dynamic view of the wiki's category structure as a tree | |
Cite | Allows footnotes for citing sources and helps for correctly citing content in offline media | |
CiteThisPage | Adds a special page that provides different citation formats for a particular article | |
CodeEditor | Provides a syntax-highlighting code editor for site & user JS, CSS and Lua pages, integrating with advanced edit toolbar | yes |
ConfirmEdit | Adds CAPTCHAs for page saves and other user actions | |
Discussion Tools | A set of tools to enhance discussion pages | |
Echo | In-wiki notification system that provides the user with alerts and notices about activity on the wiki | |
Gadgets | Allow users to enable JS-based, user-provided gadgets from their preferences page | |
ImageMap | Allows clickable HTML image maps | |
InputBox | Allows users to add predefined HTML forms to wiki pages | |
Interwiki | Adds a special page to view and manipulate the interwiki table | |
Linter | Tracks the errors identified by Parsoid and expose them to editors | |
LoginNotify | Notifies you when someone logs into your account | yes |
Math | Allows to render mathematical formulas | yes |
MultimediaViewer | Provides a better experience to users when they click on thumbnails in a page | yes |
Nuke | Gives sysops the ability to mass delete pages. | |
OATHAuth | Provides two-factor authentication for logging in | |
PageImages | Stores information about images representing a page | |
ParserFunctions | Enhances parser with logical and string functions | |
PdfHandler | Shows uploaded PDF files in a multipage preview layout | |
Poem | Allows easy formatting of poems and similar material | |
Replace Text | Provides a form to let administrators do string replacements on the entire wiki, for both page contents and page titles | yes |
Scribunto | Provides a framework for embedding scripting languages into MediaWiki pages | |
SecureLinkFixer | Rewrites URLs to HTTPS if domain always requires HTTPS | |
SpamBlacklist | Provides a regex-based spam filter | |
SyntaxHighlight | Allows source code to be syntax highlighted on the wiki pages | |
TemplateData | Allows to store, retrieve and visualise information about templates | |
TextExtracts | Provides API with plain-text or limited HTML extracts of page content | |
Thanks | Sends public 'thank you' notifications (via Echo) to other users | |
TitleBlacklist | Blocks the creation of pages matching a regular expression blacklist | |
VisualEditor | Allows for editing pages as rich content | |
WikiEditor | Provides an extendable wikitext editing interface and many feature-providing modules | yes |