ICT:MW upgrade 1.43.8 to 1.46 LTS
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:
- Download the 1.46‑compatible version
- Place it in
/var/www/mw146/extensions/ - 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:
- Edit reverse‑proxy config
- Point root back to
/var/www/mw143 - Reload proxy
- 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