{"id":242,"date":"2007-10-03T12:47:41","date_gmt":"2007-10-03T10:47:41","guid":{"rendered":"https:\/\/www.moonbug.org\/log\/2007\/10\/03\/upgrading-mediawiki-on-dreamhost\/"},"modified":"2007-10-03T14:51:32","modified_gmt":"2007-10-03T12:51:32","slug":"upgrading-mediawiki-on-dreamhost","status":"publish","type":"post","link":"https:\/\/www.moonbug.org\/log\/2007\/10\/03\/upgrading-mediawiki-on-dreamhost\/","title":{"rendered":"Upgrading MediaWiki On Dreamhost"},"content":{"rendered":"<p>Warning: techie post ahead, mainly for my own future reference&#8230;<\/p>\n<p>Back in 2005 I set up <a href=\"http:\/\/wiki.killuglyradio.com\/\">Zappa Wiki Jawaka<\/a>, a wiki (you guessed it) dedicated to (you guessed it) Frank Zappa. Grabbed the latest <a href=\"http:\/\/mediawiki.org\/\">MediaWiki<\/a> package and patiently went through all the loops of setting up a database, configuring php files, customizing, etc.<\/p>\n<p>No more than one month later, <a href=\"http:\/\/www.dreamhost.com\/\">Dreamhost<\/a> 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 &#8212; 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&#8217;t allow for one-click upgrading.<\/p>\n<p>Adding insult to injury, along came the <a href=\"http:\/\/en.wikipedia.org\/wiki\/Spambot\">spam<\/a>&#8211; and <a href=\"http:\/\/meta.wikimedia.org\/wiki\/Vandalbot\">vandalbots<\/a>. 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.<\/p>\n<p>Here&#8217;s what I did:<\/p>\n<ol>\n<li>Make a back-up of all the wiki&#8217;s current files<\/li>\n<li>Make a copy of the database for testing purposes<\/li>\n<li>Set up a new subdomain running PHP5.2 for testing purposes<\/li>\n<li>Did a one-click install of Mediawiki 1.11.0 on the testing domain from within Dreamhost&#8217;s admin panel<\/li>\n<li>Pointed the install to the outdated database, hoping it too would be upgraded in the process.<\/li>\n<\/ol>\n<p>No dice. The installer ran okay for about half a second, then choked, complaining that it couldn&#8217;t find a certain table within the database.<\/p>\n<p>MediaWiki&#8217;s <a href=\"http:\/\/www.mediawiki.org\/wiki\/Manual:Contents\">online manual<\/a> 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 <em>maintenance<\/em> folder, look for two files (<em>upgrade1_5.php<\/em> and <em>update.php<\/em>) and run them.<\/p>\n<p>Hurrah! I quickly pointed my browser to <em>upgrade1_5.php<\/em> and was greeted with the following message: &#8220;this script must be run from the command line&#8221;.<\/p>\n<p>Uh oh. Command line. <a href=\"http:\/\/imdb.com\/title\/tt0086567\/\">Wargames<\/a>, anyone?<\/p>\n<p>We&#8217;re now a couple of hours later, I&#8217;ve got some basic shell commands under my belt from various <a href=\"http:\/\/www.webhostgear.com\/35.html\">tutorials<\/a> and I&#8217;m staring at the <a href=\"http:\/\/www.apple.com\/macosx\/features\/unix\/\">Terminal<\/a>. Time for the real magic:<\/p>\n<p><code><br \/>\nssh me@mydomain.com<br \/>\nme@mydomain.com password: mypassword<br \/>\n$[server] ls<br \/>\n$[server] cd wiki.killuglyradio.com\/maintenance\/<br \/>\n$[server] php upgrade1_5.php<br \/>\n$[server] php update.php<br \/>\n<\/code><\/p>\n<p>&#8230; upon which I re-ran the installer, and was greeted with a shiny &#8220;<strong>Installation complete!<\/strong>&#8221; message.<\/p>\n<p>Hello, one-click upgrade!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Warning: techie post ahead, mainly for my own future reference&#8230; 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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[6,5],"tags":[],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"_links":{"self":[{"href":"https:\/\/www.moonbug.org\/log\/wp-json\/wp\/v2\/posts\/242"}],"collection":[{"href":"https:\/\/www.moonbug.org\/log\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.moonbug.org\/log\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.moonbug.org\/log\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.moonbug.org\/log\/wp-json\/wp\/v2\/comments?post=242"}],"version-history":[{"count":0,"href":"https:\/\/www.moonbug.org\/log\/wp-json\/wp\/v2\/posts\/242\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.moonbug.org\/log\/wp-json\/wp\/v2\/media?parent=242"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.moonbug.org\/log\/wp-json\/wp\/v2\/categories?post=242"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.moonbug.org\/log\/wp-json\/wp\/v2\/tags?post=242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}