Warning: techie post ahead, mainly for my own future reference…
Back in 2005 I set up Zappa Wiki Jawaka, a wiki (you guessed it) dedicated to (you guessed it) Frank Zappa. Grabbed the latest MediaWiki package and patiently went through all the loops of setting up a database, configuring php files, customizing, etc.
No more than one month later, Dreamhost made MediaWiki a one-click install. Instead of having to fiddle around for hours, you now had your own wiki at the push of one button — and were able to upgrade it at the push of that same button. Alas, there I was, stuck with my own homegrown 1.4.2 install which didn’t allow for one-click upgrading.
Adding insult to injury, along came the spam– and vandalbots. My poor outdated wiki was taking a constant beating, and there was nothing I could do about it, because every single extension I tracked down required a more recent version. There was only one solution: bite the bullet and upgrade.
Here’s what I did:
- Make a back-up of all the wiki’s current files
- Make a copy of the database for testing purposes
- Set up a new subdomain running PHP5.2 for testing purposes
- Did a one-click install of Mediawiki 1.11.0 on the testing domain from within Dreamhost’s admin panel
- Pointed the install to the outdated database, hoping it too would be upgraded in the process.
No dice. The installer ran okay for about half a second, then choked, complaining that it couldn’t find a certain table within the database.
MediaWiki’s online manual to the rescue: a huge forest of words and links where you tend to get lost within a minute or so. A couple of hours and liters of cafeine later, I came across a page that looked like it had the answer. It said: go to your maintenance folder, look for two files (upgrade1_5.php and update.php) and run them.
Hurrah! I quickly pointed my browser to upgrade1_5.php and was greeted with the following message: “this script must be run from the command line”.
Uh oh. Command line. Wargames, anyone?
We’re now a couple of hours later, I’ve got some basic shell commands under my belt from various tutorials and I’m staring at the Terminal. Time for the real magic:
firstname.lastname@example.org password: mypassword
$[server] cd wiki.killuglyradio.com/maintenance/
$[server] php upgrade1_5.php
$[server] php update.php
… upon which I re-ran the installer, and was greeted with a shiny “Installation complete!” message.
Hello, one-click upgrade!