From Gentoo Wiki
Jump to:navigation Jump to:search

Stable LTS MediaWiki version is presently v1.39.x, which is end of life November 2025.


  • Use testing VM as primary playground and change staging area for testing unstable releases.
  • Use wikitest.g.o site as staging area for deploying MediaWiki stable releases.
  • Check system requirements of each release and compare against what the servers have running.
    • Check present PHP version: php --version
    • Update PHP to latest stable release (if necessary). It may be necessary to create docs on Infra wiki for this task, since they may not exist.

Pre-update checklist

Download, verify, decompress update file(s)

  1. Download the latest release (or the appropriate patch) and associated signature to the work directory.


  1. Notify the community that an update is occurring, add the follow text to MediaWiki:Sitenotice.
    • In progress
      • Site updates are underway! The wiki will be marked read-only until maintenance is finished. See the news on [[Main_Page#News|the front page]] for details and [ our status site] for details.
    • Notification of completion should be left up for a period of UAT (one or two weeks):
      • Site updates have been completed! Please report any issues to [ Bugzilla] or [irc:// #gentoo-wiki on Freenode]. See the news on [[Main_Page#News|the front page]] for details and [ our status site] for details.

Create backups

  1. Create a database export/backup (SQL and XML) of the current wiki on the database host. See the infrawiki's runbook for more details here.
  2. Backup current htdocs, copy wiki images to wikitest, then copy wikitest htdocs to updated:
    • htdocs: tar --create --preserve-permissions --xz --xattrs-include='*.*' --acls --verbose --file gentoowiki.tar.xz --directory /path/to/directory/ .

Clear job queue

Follow upstream's instruction to clear the job queue:

root #php maintenance/runJobs.php

Apply Mediawiki base file update(s)

  1. Apply release:
    • TODO
  2. Apply patch:
    • Unzip: gunzip mediawiki-1.35.7.patch.gz
    • Dry run: patch -p1 --dry-run -i mediawiki-1.35.7.patch
    • Apply the patch: patch -p1 -i mediawiki-1.35.7.patch
      • Check Special:Version to see the version has been updated to the same version as the patch.
    • Apply database update: php maintenance/update.php

Update extensions

  1. Update extensions

High-level checklist

Follow upstream's guide, and add the following for Gentoo stuff.

  1. If updating wiki.g.o: commit notification of planned downtime to infra-status site.
    • Add planned outage details under "Maintenance and outage notices" section of infra-status.
  2. Mark the wiki as read-only during data migration and upgrade: to LocalSettings.php
  1. Bring puppet and wiki repositories up to latest revisions.
  2. Update plugins and extensions via composer:
    • Run composer update --no-dev
    • Run php maintenance/update.php to update the database schema.
  3. Manual plugin updates:
    • Research updates from upstream locations.
        • Potentially upgrade Tyrian's embedded Bootstrap to latest release (v4.x).
  4. Other manual updates:
    • Update copyright year to latest year.
    • Ensure Gentoo_Wiki is set as NS_PROJECT in htdocs/includes/title/NamespaceInfo.php - This fixes some bugs that do not read the local config
  5. Once satisfied, release read-only or do a rollback.

Post-update checklist

Upon success update:

  1. Pending...

Rollback checklist

Upstream's instructions are found here.

In the event of update issues, here are procedures to follow:

  1. Halt edits via marking thee database read-only.
  2. Move target back to old database.
  3. Move old script files back.
  4. Revert puppet changes and wiki repository checkouts.
  5. Update/modify infra-status site with details as necessary.
    • Remove notification.
  6. Unlock read-only status on wiki.

Additional info