{"id":94,"date":"2012-03-14T14:14:29","date_gmt":"2012-03-14T18:14:29","guid":{"rendered":"http:\/\/rajdude.com\/blog\/?p=94"},"modified":"2012-03-16T14:15:03","modified_gmt":"2012-03-16T18:15:03","slug":"my-mediawiki-upgrade-procedure-to-ver-1-8","status":"publish","type":"post","link":"https:\/\/rajdude.com\/blog\/my-mediawiki-upgrade-procedure-to-ver-1-8\/","title":{"rendered":"my mediawiki upgrade procedure to ver 1.8"},"content":{"rendered":"<p>Here is how I upgraded from mediawiki version 1.5 to 1.8.<\/p>\n<p>First follow the instructions on <a href=\"http:\/\/www.mediawiki.org\/wiki\/Manual:Upgrading_to_1.8\" target=\"_blank\">this page<\/a>.<\/p>\n<p><!--more--><\/p>\n<h1>Check requirements:<\/h1>\n<ul>\n<li>PHP version<\/li>\n<\/ul>\n<p>To find PHP version, I created a small file on the server. Called it phpinfo.php. Pasted this code in it:<\/p>\n<pre>&lt;?php phpinfo() ?&gt;<\/pre>\n<p>When called within a web browser it displays useful info about PHP on the server. I got : PHP Version 5.3.2-1ubuntu4.14. so I am good here<\/p>\n<ul>\n<li>My SQL version<\/li>\n<\/ul>\n<p>Using webmin I can see that mysql is version 5.1.61. All set here too.<\/p>\n<h1>Backup<\/h1>\n<p>To backup\u00a0the database, I used webmin&#8217;s Mysql module<\/p>\n<p>To backup the file system I used this command on a shell<\/p>\n<pre>tar cvzf mediawiki.tar.gz \/var\/www\/mediawiki<\/pre>\n<h1>Delete old wiki files<\/h1>\n<p>This is something which I did but was not mentioned in the official upgrade procedure. I figured it will keep the install clean.<\/p>\n<p>Delete the old files and directories except:<\/p>\n<ol>\n<li>the extensions\/ directory<\/li>\n<li>the images\/ directory<\/li>\n<li>any other directory where files have been uploaded [I had two other]<\/li>\n<li>the .htaccess file\u00a0[there was none in my old install]<\/li>\n<li>the AdminSettings.php file [there was none in my old install]<\/li>\n<li>the LocalSettings.php file<\/li>\n<\/ol>\n<p>It was\u00a0easily done using webmin&#8217;s file manager. I can select multiple files by holding down control key and delete them.<\/p>\n<h1>Unpack new files<\/h1>\n<ol>\n<li>I download version 1.8 and uploaded to \/var\/www\/mediawikinew using webmin [clean location]<\/li>\n<li>I let webmin I extract the tar file during upload.<\/li>\n<\/ol>\n<p>\u00a0Then I used webmin to cut and paste the contents of the uploaded directory to the mediawiki directory.<\/p>\n<p>I ran into problems here. File manager complained that two directories were already there [images and extensions] and wont overwrite them.<\/p>\n<p>\u00a0Since the new images folder has nothing in it. I ignore that problem.<\/p>\n<p>I renamed the old extensions folder to extensions_old and copied over the new extensions folder.<\/p>\n<p><!--more--><\/p>\n<h1>Correct file permisions<\/h1>\n<p>After copying the stuff we need to make sure every folder under mediawiki has the correct permissions. Make everything writable by user and group called &#8220;www-data&#8221;<\/p>\n<p>&nbsp;<\/p>\n<h1>Copy over the extensions<\/h1>\n<p>\u00a0I copied\u00a0the old extensions<\/p>\n<ol>\n<li>Flash.php<\/li>\n<li>flashonweb.php<\/li>\n<li>embed_document.php<\/li>\n<li>LdapAuthentication.php<\/li>\n<li>\/extensions\/EmbeddedVideo<\/li>\n<li>\/extensions\/spellcheck<\/li>\n<\/ol>\n<p>Commented out\u00a0FCK editor by editing the localsettings.php file in mediawiki directory<\/p>\n<pre>#\u00a0enabling FCK editor:\r\n# require_once(\"$IP\/extensions\/FCKeditor\/FCKeditor.php\");\r\n# $wgUseAjax = 'true';<\/pre>\n<h1>\u00a0temporarily change user permissions<\/h1>\n<p>Since Apache runs as www-data and &#8216;maybe&#8217; the user account you are using &#8216;admin&#8217; to run these scripts does not belong to www-data group&#8230; you will get errors while running the scripts in the next section. especially while running the refreshlinks.php. That script creates sub directories under images. I was getting an error and found out how to solve it\u00a0<a href=\"http:\/\/www.mwusers.com\/forums\/showthread.php?17926-New-install-wfMkdirParents-failed-to-mkdir-(an-image-thumbnail-directory)\">here<\/a>.<\/p>\n<p>To solve this issue&#8230; add www-data group to your admin account temporarily. After running the scripts you can revert this change back.<\/p>\n<h1>Run the update script<\/h1>\n<p>From a putty session to the server I ran the commands:<\/p>\n<pre>cd \/var\/www\/mediawiki\/maintenance<\/pre>\n<pre>php update.php<\/pre>\n<pre>php refreshLinks.php<\/pre>\n<h1>Correct file permisions again<\/h1>\n<p>While running the refreshlinks.php command some directories are created under the admin account. So lets change the permissions to\u00a0make everything writable by user and group called &#8220;www-data&#8221; one more time.<\/p>\n<h1>upgrade extensions<\/h1>\n<p>We are using these extensions:<\/p>\n<ul>\n<li>Flash.php<\/li>\n<li>flashonweb.php<\/li>\n<li>embed_document.php<\/li>\n<li>LdapAuthentication.php<\/li>\n<li>\/extensions\/EmbeddedVideo<\/li>\n<li>\/extensions\/spellcheck<\/li>\n<\/ul>\n<p>TO DO: Need to find out the latest versions of these and update them<\/p>\n<p>&nbsp;<\/p>\n<h1>TESTING the WYSIWYG editor : wikiEditor<\/h1>\n<p>Installation instructions are <a href=\"http:\/\/www.mediawiki.org\/wiki\/Extension:WikiEditor\">here<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here is how I upgraded from mediawiki version 1.5 to 1.8. First follow the instructions on this page.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[27],"class_list":["post-94","post","type-post","status-publish","format-standard","hentry","category-itsys","tag-mediawiki"],"_links":{"self":[{"href":"https:\/\/rajdude.com\/blog\/wp-json\/wp\/v2\/posts\/94","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rajdude.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rajdude.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rajdude.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rajdude.com\/blog\/wp-json\/wp\/v2\/comments?post=94"}],"version-history":[{"count":16,"href":"https:\/\/rajdude.com\/blog\/wp-json\/wp\/v2\/posts\/94\/revisions"}],"predecessor-version":[{"id":105,"href":"https:\/\/rajdude.com\/blog\/wp-json\/wp\/v2\/posts\/94\/revisions\/105"}],"wp:attachment":[{"href":"https:\/\/rajdude.com\/blog\/wp-json\/wp\/v2\/media?parent=94"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rajdude.com\/blog\/wp-json\/wp\/v2\/categories?post=94"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rajdude.com\/blog\/wp-json\/wp\/v2\/tags?post=94"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}