[Rack] Experience upgrading wikis?
Torrie Fischer
tdfischer at hackerbots.net
Sat Apr 4 21:07:03 UTC 2015
Sounds like you've hit the first pitfall: finding out mediawiki is out of date.
There's a few big components that you'll want to consider when upgrading a
mediawiki install:
* Random one-off modifications to the codebase
* LocalSettings.php
* File uploads
* Plugins/extensions
* Themes
* Alcohol
I maintained the wiki for synhak.org for a few years and went through a couple
of upgrade rounds through ansible. Noisebridge.net does not use ansible, so
I'm going to guess that you'll be doing some Really Fun And Delicate surgery.
First, take the entire installed tree and stuff it into two tarballs: one for
the sources, and one for the file uploads. Make sure LocalSettings.php gets
into it. Also make a copy of the sql database.
Next you'll want to take the current installed codebase and stick it in git on
top of a known last revision. For example, check out the synhak-* branches
here:
https://github.com/synhak/mediawiki
Once thats in place, you can pour yourself a drink and "just" rebase the local
branch on top of the version you're wanting to deploy and all your local one-
off hacks will stick around. You're doing this on your local machine and not
noisebridge.net, of course. Make sure you get anything about .htaccess files if
those are used included since I do know that this is apache.
File uploads should be in a single directory within the mediawiki install,
unless LocalSettings.php says otherwise. Shouldn't be too hard to find them and
protect them from your machete.
Same goes for mediawiki extensions and such. Your best bet would be to check
all the installed versions and update them to the latest from mediawiki git. I
know you'll be introducing a lot more moving parts, but you're already
upgrading a MediaWiki monster so it shouldn't be much in comparison. Internal
APIs and such are likely so totally moved that you'll be broken no matter what
you try, so best to get a head start. You'll probably want something stronger
like whisky at this point, since you'll find that a lot of extensions are
"hosted" in random pages on mediawiki.org. Wikis with anonymous editing make a
great VCS, as you'll learn.
Chances are, we're using the MonoBook theme which is the default mediawiki
theme. It probably has a bunch of modifications on top of it, which you'll be
able to fast-forward when you stuck all these other changes in git and rebased
to the latest upstream version. If it isn't the monobook theme, treat it just
like an extension; stick changes in git and rebase to the latest version.
By now you should be sufficiently numb to not feel any real pain. Take another
shot or three of ethanol just to be sure, and dump this mess onto another
directory on the server. Set up some hardlinks/symlinks so you can do an
atomic swap between the old wiki install and the new one in case you realize
you've been dealing with PHP this whole time and need to back out. Update
apache configs to use the directory links, then hit The Big Red Button that
swaps things around.
You've got my number for when you need emotional support in this process. Best
of luck, we're all counting on you. <3
On Saturday, April 04, 2015 01:43:55 PM Patrick O'Doherty wrote:
> Hey folks,
>
> Checked the other day and it seems that our current mediawiki version is
> 1.19.1 which is quite far behind event the latest LTS release.
>
> Anyone have experience upgrading mediawiki installs? Reading through the
> docs at the moment but would love to hear of common pitfalls folks have
> hit.
>
> cheers,
>
> p
More information about the Rack
mailing list