Jump to content

ICT:MW upgrade 1.43.8 to 1.46 LTS

From Costa Sano MediaWiki
Revision as of 13:59, 4 April 2026 by Mngr (talk | contribs) (Created page with "= MediaWiki Upgrade Procedure — 1.43.8 → 1.46 LTS = '''Document version:''' 2025‑04‑04 '''Author:''' Martin '''Purpose:''' Clean, reproducible, successor‑friendly upgrade to MediaWiki 1.46 LTS using a parallel installation in <code>/var/www/mw146</code> and a reverse‑proxy switch. This procedure ensures: * Zero downtime * Instant rollback * No leftover files from old versions * Clean, maintainable, successor‑friendly architecture The upgrade i...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

MediaWiki Upgrade Procedure — 1.43.8 → 1.46 LTS

Document version: 2025‑04‑04 Author: Martin Purpose: Clean, reproducible, successor‑friendly upgrade to MediaWiki 1.46 LTS using a parallel installation in /var/www/mw146 and a reverse‑proxy switch.

This procedure ensures:

  • Zero downtime
  • Instant rollback
  • No leftover files from old versions
  • Clean, maintainable, successor‑friendly architecture

The upgrade is executed on the web VM with a final switch on the reverse‑proxy VM.


Preconditions

  • Working MediaWiki 1.43.8 LTS installation
  • Database VM reachable and healthy
  • PHP 8.1 or 8.2
  • Reverse proxy currently pointing to /var/www/mw143
  • VM snapshot taken before starting
  • SSH access to web VM and reverse‑proxy VM

Step 1: Prepare new directory

On the web VM:

cd /var/www
mkdir mw146

Download and extract MediaWiki 1.46 LTS:

wget https://releases.wikimedia.org/mediawiki/1.46/mediawiki-1.46.0.tar.gz
tar -xzf mediawiki-1.46.0.tar.gz --strip-components=1 -C mw146

Resulting structure:

/var/www/mw146

Step 2: Copy required files from old installation

From the existing 1.43 installation (example path /var/www/mw143):

Copy LocalSettings.php

cp /var/www/mw143/LocalSettings.php /var/www/mw146/

Copy images directory

cp -R /var/www/mw143/images /var/www/mw146/

Copy custom logos (if stored outside images)

cp /var/www/mw143/resources/assets/*logo* /var/www/mw146/resources/assets/

Do not copy extensions yet.


Step 3: Install or update extensions

MediaWiki 1.46 requires updated extensions.

For each extension used in 1.43:

  1. Download the 1.46‑compatible version
  2. Place it in /var/www/mw146/extensions/
  3. Keep the same configuration lines in LocalSettings.php

Vector‑2022 is bundled in 1.46 → no action needed.


Step 4: Run the database upgrade

On the web VM:

cd /var/www/mw146
php maintenance/update.php

This upgrades the schema in place. No data is lost. No new database is created.


Step 5: Local testing before switching reverse proxy

Access the new installation directly via the web VM’s IP:

http://<web-vm-ip>/mw146/

Verify:

  • Login
  • Namespaces and subpages
  • Uploads
  • SMTP
  • Dark mode
  • Vector‑2022 behaviour
  • Special pages (filter box present)
  • Search
  • Logo

Proceed only when everything is correct.


Step 6: Switch reverse proxy

On the reverse‑proxy VM, update the root path.

Example (Nginx):

root /var/www/mw146;

Reload:

systemctl reload nginx

The wiki now runs on 1.46 LTS.

Rollback is instant: point back to /var/www/mw143.


Step 7: Post‑upgrade checks

  • Check error logs on web VM
  • Check reverse‑proxy logs
  • Verify job queue
  • Verify uploads
  • Verify Special pages
  • Verify dark mode
  • Verify email notifications

Step 8: Cleanup

After several days of stable operation:

rm -rf /var/www/mw143

Or archive it for long‑term reference.


Rollback Procedure

If any issue occurs after switching:

  1. Edit reverse‑proxy config
  2. Point root back to /var/www/mw143
  3. Reload proxy
  4. Wiki is instantly restored

Database remains compatible.


Notes

  • MediaWiki 1.46 includes native dark mode
  • Vector‑2022 settings may be simplified
  • The Special pages filter box is available in 1.46
  • No database recreation is required for upgrades