« Mediawiki 1.39 upgrade » : différence entre les versions

De Banane Atomic
Aller à la navigationAller à la recherche
Ligne 59 : Ligne 59 :


= Remove unnecessary folders =
= Remove unnecessary folders =
{| class="wikitable wtp wtmono1"
! Folder
! Description
|-
| docs || documentation
|-
| tests || test files
|}


= Clean =
= Clean =

Version du 22 janvier 2023 à 10:46


Environment

  • Ubuntu ARM 18.04
  • Apache with PHP-FPM

Disable the website

Bash.svg
# 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

Bash.svg
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

Bash.svg
cd /var/www/wiki

export SERVER_NAME=wiki.bananeatomic.fr
php maintenance/update.php

export SERVER_NAME=kiwi.bananeatomic.fr
php maintenance/update.php

Remove unnecessary folders

Folder Description
docs documentation
tests test files

Clean

Bash.svg
# delete unused folder
sudo rm -rf mediawiki.bak