Difference between revisions of "Upgrade Mediawiki 1.27 to 1.31 on FreeBSD 11.2"

From Aram's Wiki
Jump to: navigation, search
 
(No difference)

Latest revision as of 23:40, 7 January 2019


Introduction

We'll upgrade MediaWiki to 1.31 using PHP 7.2.

Prerequisites

We assume you have MediaWiki 1.27 installed.

Back-up data

sudo zfs snap -r tank/mediawiki@`date '+%Y-%m-%d-%H%M'`

Install new packages

sudo pkg install -y mediawiki131-php72 php72-pdo_sqlite
sudo service php-fpm restart
sudo service nginx restart

Patch LocalSettings.php

Make sure LocalSettings.php loads the skins like so:

require_once "$IP/skins/Vector/Vector.php";
require_once "$IP/skins/MonoBook/MonoBook.php";
require_once "$IP/skins/Timeless/SkinTimeless.php";
require_once "$IP/skins/MinervaNeue/MinervaNeue.php";

Install Minerva Skin (required by MobileFrontend)

sudo chown root:staff /usr/local/www/mediawiki/skins
sudo sudo chmod g+w /usr/local/www/mediawiki/skins
cd /usr/local/www/mediawiki/skins
wget https://extdist.wmflabs.org/dist/skins/MinervaNeue-REL1_31-2e70e79.tar.gz
tar -xzf MinervaNeue-REL1_31-2e70e79.tar.gz -C /usr/local/www/mediawiki/skins

Update MobileFrontend

cd /usr/local/www/mediawiki/extensions
wget https://extdist.wmflabs.org/dist/extensions/MobileFrontend-REL1_31-7f66849.tar.gz
rm -r MobileFrontend
tar -xzf MobileFrontend-REL1_31-7f66849.tar.gz -C /usr/local/www/mediawiki/extensions

Run the upgrade script

cd /usr/local/www/mediawiki/maintenance
sudo su -m -c staff www -c '/usr/local/bin/php update.php'
sudo service php-fpm restart
sudo service nginx restart

You are now done.