User:Rogerhc/upgrade 1.31.1 LTS to 1.35.1 LTS (2021)

Upgrade of "production".com MW 1.31.1 to MW 1.35.1.

Manual:Upgrading << READ THAT FIRST, INSTEAD and BECAUSE.

The following is a spiderweb intended to catch flys. Ym. Thoughts? No, flys.

First a dev.com wiki
Setup dev.com wiki.

I like to start with a fresh default install of the new MW version, then add the files (images, LocalSettings.php, extensions and configs) that production.com requires, then dump the production database in and test.

PHP version
PHP version of production.com MW1.31.1 is PHP 7.2 but MW1.35.1 requires PHP 7.3 or higher. Well, MW1.31.1 is compatible with PHP 7.3 but not PHP 7.4. So set production.com webhost to PHP 7.3, which both versions are compatible with.

cPanel >> Software >> Select PHP Version (set to PHP 7.3).

Wget MW1.35.1
See Manual:Upgrading

$ cd /path/to/your/new/installation/ $ wget https://releases.wikimedia.org/mediawiki/1.35/mediawiki-1.35.1.tar.gz $ tar -xvzf mediawiki-1.35.1.tar.gz $ rm mediawiki-1.35.1.tar.gz

Test
Test the dev.com wiki.

Then the production.com wiki
Do a full backup of production.com wiki (files AND database). Then replace production.com wiki files with the new dev.com wiki files, and update the database (maintenance/update.php). Don't bring the database over from dev.com. We don't want the testing cruft.

Freeze the exp.com wiki
Set no-edit at bottom of LocalSettings.php.

Clear jobs que
see Manual:runJobs.php $ php maintenance/runJobs.php

cp
cp the files to exp.com.MW1.31.1-20210101

dump
dump the database to exp.MW1.31.1-20210101.sql

Update database
maintenance/update.php or something

Unfreeze exp.com
Comment out no-edit lock at bottom of LocalSettings.php.

Test
If all fails, revert to backup of old version (and reset PHP version in cpanel if needed).