Actions

Mediawiki 1.39 from 1.31

From Mike Beane's Blog

Revision as of 23:43, 10 December 2023 by Rabbi Bob (talk | contribs) (Created page with "=Background= For a long time (too long), I put off updating Mediawiki and the server (Ubuntu 16.04) it ran on. Waiting only made it worse as installing upgrades and testing became nearly impossible via apt repositories. Updating 16.04 up to 18LTS broke things, php versions changed multiple times, etc. etc. <br><br> If you look at the compatibility table, it ends up looking like 6 jumps to get to 1.39LTS and that's a lot of updating. =The Long Path= {| class="wikitable"...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Background

For a long time (too long), I put off updating Mediawiki and the server (Ubuntu 16.04) it ran on. Waiting only made it worse as installing upgrades and testing became nearly impossible via apt repositories. Updating 16.04 up to 18LTS broke things, php versions changed multiple times, etc. etc.

If you look at the compatibility table, it ends up looking like 6 jumps to get to 1.39LTS and that's a lot of updating.

The Long Path

Version MySQL PHP Jumps Status Notes
MediaWiki 1.39 LTS MySQL 5.7.0 or higher PHP 7.4.3 or later 6 DONE 8.1.0+ is possible here
MediaWiki 1.38 MySQL 5.5.8 or later PHP 7.3.19 or later 5
MediaWiki 1.37 MySQL 5.5.8 or later PHP 7.3.19 or later, or PHP 7.4.3 or later 4
MediaWiki 1.36 MySQL 5.5.8 or later PHP 7.3.19 or later 3
MediaWiki 1.35 LTS MySQL 5.5.8 or later use PHP 7.3.19+ 2 DONE 7.4.3 is possible here
MediaWiki 1.34 MySQL 5.5.8 or later PHP 7.2.9 or above
MediaWiki 1.33 MySQL 5.5.8 or later PHP 7.0.0 1 DONE
MediaWiki 1.32 MySQL 5.5.8 or later PHP 7.0.0

The Short Path

Instead, try getting to LTS 1.31 if you're not already there. I had one set of wiki's at 1.33 and one at 1.31: I opted to level everything in the same way, but that was still only 3 jumps.

Version MySQL PHP Jumps Status Notes
MediaWiki 1.39 LTS MySQL 5.7.0 or higher PHP 7.4.3 or later 3 DONE 8.1.0+ is possible here
MediaWiki 1.35 LTS MySQL 5.5.8 or later use PHP 7.3.19+ 2 DONE 7.4.3 is possible here
MediaWiki 1.33 MySQL 5.5.8 or later PHP 7.0.0 1 DONE
MediaWiki 1.31 LTS MySQL 5.5.8 or later PHP 7.0.0 0 START Go to 7.4.3


That's a little better.

The Approach

Prepping the Databases

  • From the old sites I made copy of the Extensions that were installed via the Special:Version page
  • After putting together a new Ubuntu 22.04LTS server in VM, I opted to put
    • MySQL at 5.7.0+
    • php at 7.4.3
  • I installed the lowest version of MediaWiki I required and verified it worked.
    • I then pulled in a backup of my two wiki sites
    • I imported images/ from the same site
    • I pointed mediawiki (via localsettings.php) at one of the databases
      • Ran maintenance/update.php --force
    • Verified that the information loaded in the new site
  • NOTE: I entirely ignored Skins and Extensions.
  • Repeated for Site #2
  • Once I had a working MW site for each database, I installed the next LTS MW version.
  • Repeated the above steps
  • Once I had a working MW site for each database, I installed the next LTS MW version.
  • Repeated the above steps
  • Eventually I had two working MW databases at 1.39

New Ubuntu Server

  • I created a new Ubuntu 22.04 server and on this one, I took the time to set up various security related items.
  • I opted to put
    • MySQL at 8.0.35-0ubuntu0.22.04.1
    • php at 8.1.2-1ubuntu2.14 (apache2handler)
  • Installed apache2, created a new MW1.39LTS site to verify it ran under the new software.
  • From there, I imported the two site databases, copied the 1.39 directory to two separate directories, set up MW, imported images and all was good.

Extensions and Skins

  • The Skin was freshly installed from the latest version. Not much of an issue there.
  • This was a little more tedious: I matched up the default 1.39 extensions against the old site listings and then went looking to for the latest extensions.
    • Some extensions were still in production
    • Some were not
  • Fiddled until things were working. Had to fix some code for YouTube.

Summary

  • I tried this about seven months ago and I was attempting to update the extensions as I went: this was not the way to go. Getting the database updated was the key and ignoring everything else made that easier to do. All a wiki really is at the base is the information (database) and the images/... everything else is functionality.