How to upgrade mediawiki: Difference between revisions
(initial revision) |
(changed headings) |
||
Line 1: | Line 1: | ||
= Background = | |||
Our wiki installation is cloned from mediawiki's git repository. | Our wiki installation is cloned from mediawiki's git repository. | ||
Mediawiki has branches for each release; we have branches that track | Mediawiki has branches for each release; we have branches that track | ||
Line 26: | Line 28: | ||
That's the overview. I'll go into more detail below. | That's the overview. I'll go into more detail below. | ||
= | = The Upgrade Process = | ||
With that said, the upgrade involves five steps. | With that said, the upgrade involves five steps. |
Revision as of 15:21, 10 December 2016
Background
Our wiki installation is cloned from mediawiki's git repository. Mediawiki has branches for each release; we have branches that track mediawiki branches.
In general, the Masspirates mediawiki is the standard mediawiki distribution, plus a couple of commits (for changes to LocalSettings.php and such).
For example:
$ git status On branch mapp-1.28 Your branch is ahead of 'origin/REL1_28' by 2 commits. (use "git push" to publish your local commits)
$ git branch * mapp-1.28 master
Above, mapp-1.28 is based on mediawiki's REL1_28 branch, and there are a few changes on top. Upgrading follows one of two procedures:
- Pulling in changes from the same branch. In this case, just rebase
- Switching to a new branch. Here, we want to make a new (local) branch off the new upstream release, and cherry pick
That's the overview. I'll go into more detail below.
The Upgrade Process
With that said, the upgrade involves five steps.
- Backup the database
- upgrade code
- run maintenance/update.php
- update composer's dependencies
- resolve any changes to configuration variables.
We'll go through these steps one at a time
Database Backup
mysqldump --verbose -uUSER -pPASSWD --complete-insert=1 DBNAME | gzip -9 > masspira_mdw1.$(date +%F).sql.gz mv *.sql.gz backup
Update Code
Rebasing from the same branch
git status # should be no outstanding changes git remote update git rebase origin/REL1_28
Above, substitute "origin/REL1_28" with the actual upstream branch.
Having done this,
git log --oneline origin/REL1_28..HEAD
lists the local changes we've made.
Switching to a new Release branch
(to be written)
Running Maintainance Scripts
$ php maintenance/update.php
Update composer dependencies
$ ~/bin/composer update
Resolving Changes to Configuration Variables
For this step, look at the "UPGRADE" and "RELEASE-NOTES" files in mediawiki's root directory. It's a good idea to look through these files anyway, to see what changes are in the new release.