« Mediawiki 1.39 upgrade » : différence entre les versions
De Banane Atomic
Aller à la navigationAller à la recherche
Ligne 57 : | Ligne 57 : | ||
php maintenance/update.php | php maintenance/update.php | ||
</kode> | </kode> | ||
= Customize the Monobook skin = | |||
= Remove unnecessary folders = | = Remove unnecessary folders = |
Version du 22 janvier 2023 à 10:54
Environment
- Ubuntu ARM 18.04
- Apache with PHP-FPM
Disable the website
# disable the website sudo a2dissite wiki.conf sudo a2dissite kiwi.conf sc-reload apache2 # at the end, re-enable the website sudo a2ensite wiki.conf sudo a2ensite kiwi.conf sc-reload apache2 |
Install the version 1.39
wget https://releases.wikimedia.org/mediawiki/1.39/mediawiki-1.39.1.tar.gz tar xf mediawiki-1.39.1.tar.gz cd /var/www # backup the previous version sudo mv wiki wiki.bak # copy the new mediawiki folder and needed files from previous install sudo mv -T mediawiki-1.39.1 wiki sudo cp -r wiki.bak/images/. wiki/images sudo cp -r wiki.bak/images-kiwi wiki/images-kiwi sudo mkdir wiki/cache-kiwi # copy the LocalSettings sudo cp wiki.bak/LocalSettings.php wiki # copy the custom extensions sudo cp -r wiki.bak/extensions/MyCustomExtension wiki/extensions # update the owner sudo chown -R root:root wiki sudo chown -R www-data:www-data wiki/cache wiki/cache-kiwi wiki/images wiki/images-kiwi |
Upgrade the database
cd /var/www/wiki export SERVER_NAME=wiki.bananeatomic.fr php maintenance/update.php export SERVER_NAME=kiwi.bananeatomic.fr php maintenance/update.php |
Customize the Monobook skin
Remove unnecessary folders
# documentation sudo rm -rf docs # unused extensions cd extensions sudo rm -rf AbuseFilter CategoryTree Cite CiteThisPage CodeEditor ConfirmEdit Gadgets ImageMap InputBox Interwiki Math MultimediaViewer Nuke OATHAuth PageImages ParserFunctions PdfHandler Poem Renameuser ReplaceText Scribunto SecureLinkFixer SpamBlacklist SyntaxHighlight_GeSHi TemplateData TextExtracts TitleBlacklist VisualEditor WikiEditor # unused skins cd skins sudo rm -rf MinervaNeueTimeless Vector # test files sudo rm -rf tests |
Clean
# delete unused folder sudo rm -rf mediawiki.bak |