{"id":1166,"date":"2012-01-08T20:35:29","date_gmt":"2012-01-09T01:35:29","guid":{"rendered":"http:\/\/fiveforks.com\/ted\/?p=1166"},"modified":"2013-04-22T10:18:50","modified_gmt":"2013-04-22T15:18:50","slug":"wiki-upgraded","status":"publish","type":"post","link":"https:\/\/www.fiveforks.com\/ted\/2012\/01\/wiki-upgraded\/","title":{"rendered":"Wiki Upgraded"},"content":{"rendered":"<p>Back in August, I had tried and <a title=\"Wiki Upgrade\" href=\"http:\/\/fiveforks.com\/ted\/2011\/08\/wiki_upgrade\/\">failed<\/a> to upgrade the <a title=\"Flashlight Wiki\" href=\"http:\/\/flashlightwiki.com\">Flashlight Wiki&#8217;s<\/a> software from MediaWiki 1.16 to 1.17. For whatever reason, I thought it would be a good time to try again. Only now they are up to version 1.18.<!--more--><\/p>\n<p>So I downloaded the new software and then uploaded it to my server. I put the compressed file in a new folder, but really it unzips into its own folder, so that isn&#8217;t necessary. I renamed the folder flashlightwiki instead of flashlightwiki where the original is. I also did a backup of the database and all the files in the original installation. I left the zip archive of files in place with restricted permissions in case I need to recover quickly. Last time I had to re-upload the zip file to recover.<\/p>\n<p>This is where it gets tricky. I guess the way to do it is to go ahead and run the installer and generate a localsettings.php file. So I tried that out and it worked okay I guess except the wiki itself did not work exactly right when I was done. So instead I pulled up a copy of the new localsettings and the old one and did a line by line comparison to make all the same changes to the new one that I had made to the old one, while leaving any new stuff in place. Then I dragged over the images and extensions folders to the new installation.<\/p>\n<p>And I got an error. I think it was something in my meta tags extension that wasn&#8217;t working. So I disabled that extension by editing localsettings. And it worked! Sort of. There were still some problems that I spent all afternoon tracking down and fixing. It would probably help to just print a copy of the old localsettings to use as a go-by. At some point I renamed the old folder and named the new folder flashlightwiki to make it the official copy. I also needed to move the .htaccess folder at this point.<\/p>\n<p>There were some customizations I had done to the stylesheet of the old installation which I had made by modifying the css file in Monobook called main.css (which you aren&#8217;t supposed to do). I was able to eventually get these customizations to work using wiki pages instead, described at the end of <a title=\"Wiki Customizations v1.18.0\" href=\"http:\/\/fiveforks.com\/ted\/2012\/01\/wiki-customizations-v1-18-0\/\">this blog post of customizations<\/a>.<\/p>\n<p>I also tried to make my localsettings.php file a little more organized. Before I had my customizations all over the place. I would include a comment so I would know what I did, but really I don&#8217;t think the order matters so much and it is better to do all the new stuff at the bottom. But some stuff involves user preferences or disabling something in the top section. Moving my stuff to the bottom might also make upgrading easier. There is supposed to be some automatic upgrade tool, but I wasn&#8217;t able to figure that out.<\/p>\n<p>The software was upgraded in November, so hopefully they won&#8217;t change it for a little while.<\/p>\n<p>Really, I think the process\u00a0should be\u00a0easy:<\/p>\n<ul>\n<li>Unzip the software to a different folder<\/li>\n<li>Run the installer there and generate a localsettings.php file<\/li>\n<li>Make a backup of this localsettings file<\/li>\n<li>Create a hybrid localsettings that takes code from the old and the new files (this is the hardest part)<\/li>\n<li>Move the hybrid localsettings, images, extensions, and .htaccess files to the new folder.<\/li>\n<li>Rename the old folder to something else. Rename the new folder.<br \/>\nTweak the CSS if there is a new skin involved.<\/li>\n<\/ul>\n<p>For a simple update, where I don&#8217;t need to create a new localsettings file, the process is:<\/p>\n<ol>\n<li>Purge the objectcache.\n<li>Export the database in phpAdmin to have a backup.\n<li>In cPanel File Manager, make a zip archive of the flashlightwiki folder.\n<li>Change permissions of the zip file so the world can&#8217;t read it (otherwise they could get the localsettings file which has your password in it).\n<li>Download the zip archive to have a backup.\n<li>Download the software from MediaWiki to my hard drive in my web browser.\n<li>Using Filezilla, upload the MediaWiki zip installer to the public_html folder of my server space\n<li>Using cPanel&#8217;s File Manager, unzip the file. It will unzip to a new folder.\n<li>In the new installation, delete the Images folder (or rename it, but it is empty),\n<li>Copy the Images folder from the original installation to the new one.\n<li>Copy the Cite, Google AdSense, Google Translator, and UserMerge folders in Extensions over to the new Extensions folder along with the two Meta Extensions which are just files. The other extensions are included in the installation.\n<li>Copy the WPTouch skin folder and file from Skins over to the new Skins folder.\n<li>Copy Localsettings.php over to the new folder.\n<li>In FileZilla, copy .htaccess over to the new folder (.htaccess doesn&#8217;t show up in cPanel&#8217;s file manager).\n<li>Rename the old folder to flashlighwiki-old. The website is now offline.\n<li>Rename the new folder to flashlightwiki. The website is now online again.\n<li>Test the site by browsing, editing, and signing up a new user.\n<li>If everything is working, delete the old installation, the zip archive, and the installer zip file (maybe wait a day).\n<\/ol>\n<p>In WordPress, you press a button and it upgrades the software.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Back in August, I had tried and failed to upgrade the Flashlight Wiki&#8217;s software from MediaWiki 1.16 to 1.17. For whatever reason, I thought it would be a good time to try again. Only now they are up to version 1.18.<\/p>\n","protected":false},"author":15,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-1166","post","type-post","status-publish","format-standard","hentry","category-web"],"_links":{"self":[{"href":"https:\/\/www.fiveforks.com\/ted\/wp-json\/wp\/v2\/posts\/1166","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fiveforks.com\/ted\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fiveforks.com\/ted\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fiveforks.com\/ted\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fiveforks.com\/ted\/wp-json\/wp\/v2\/comments?post=1166"}],"version-history":[{"count":10,"href":"https:\/\/www.fiveforks.com\/ted\/wp-json\/wp\/v2\/posts\/1166\/revisions"}],"predecessor-version":[{"id":1169,"href":"https:\/\/www.fiveforks.com\/ted\/wp-json\/wp\/v2\/posts\/1166\/revisions\/1169"}],"wp:attachment":[{"href":"https:\/\/www.fiveforks.com\/ted\/wp-json\/wp\/v2\/media?parent=1166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fiveforks.com\/ted\/wp-json\/wp\/v2\/categories?post=1166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fiveforks.com\/ted\/wp-json\/wp\/v2\/tags?post=1166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}