{"id":346,"date":"2018-02-13T15:57:06","date_gmt":"2018-02-13T14:57:06","guid":{"rendered":"https:\/\/andreikucharavy.com\/L3Cache\/?p=346"},"modified":"2018-02-13T21:46:02","modified_gmt":"2018-02-13T20:46:02","slug":"how-to-upgrade-mediawiki-2018","status":"publish","type":"post","link":"https:\/\/andreikucharavy.com\/L3Cache\/how-to-upgrade-mediawiki-2018\/","title":{"rendered":"How to upgrade MediaWiki &#8211; approximate 2018 guide"},"content":{"rendered":"<p>Unfortunately, unlike WordPress, MediaWiki doesn&#8217;t come with a single-button update version. Perhaps because of that, perhaps because of my laziness, I have been postponing my updates of Wikimedia websites for over five years by now. However, in the light of recent vulnerability revelations, I have finally decided to upgrade my installations and started trying to figure what exactly I needed, given I only have web interfaces and FTP access to the website I manage.<\/p>\n<p>First of all, <a href=\"https:\/\/www.mediawiki.org\/wiki\/Manual:Upgrading#Adapt_your_LocalSettings.php\">this link<\/a> gives a good overview of the whole process. For my specific case, I was upgrading to the 1.30, which required a number of edits to the config file, explained <a href=\"https:\/\/www.mediawiki.org\/wiki\/MediaWiki_1.30\">here<\/a>. Now, what seemed to be happening was that after backing up my database (done for me by my hosting provider) and files (that I could to by FTP), I just needed to copy the files from the latest release version (<a href=\"https:\/\/tools.wmflabs.org\/snapshots\/#!\/mediawiki-core\/REL1_30\">REL1_30<\/a> in my case &#8211; <strong>DO NOT DO IT<\/strong>, see edit below) and copy it to the directories via FTP and then just run the database update script at <code>wiki.mywebsite.org\/mw-config\/<\/code>. Seems pretty easy, right?<\/p>\n<p>Nope, not so fast! The problem is that this distribution does not contain a crucial directory that you need to run the installation and without which you wiki installation will fail with a <code>500<\/code> code without leaving anything in the error logs of the server.<\/p>\n<p>This step isn&#8217;t really mentioned in the installation guide, but you actually need to remove the existing <code>\/vendor<\/code> folder in your installation over FTP, build the latest version for your build with a <code>git clone https:\/\/gerrit.wikimedia.org\/r\/p\/mediawiki\/vendor.git<\/code> into a <code>\/vendor<\/code> folder on your machine and then upload the files to your server.<\/p>\n<p>Only after that step can you connect the <code>\/mw-config\/<\/code> and finish upgrading the wiki.<\/p>\n<p>So yeah, let&#8217;s hope that in a not-so-distant future MediaWiki would have the same handy &#8216;update now&#8217; button as the WordPress. Because something is telling me that there are A LOT of outdated MediaWiki installs out there&#8230;<\/p>\n<p><strong>Edit:<\/strong><\/p>\n<p>After spending a couple additional hours dealing with additional issues: do not use the &#8220;core&#8221; build, but instead download the complete one, including all the skins, extensions and vendor files from <a href=\"https:\/\/releases.wikimedia.org\/mediawiki\/1.30\/mediawiki-1.30.0.tar.gz\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Unfortunately, unlike WordPress, MediaWiki doesn&#8217;t come with a single-button update version. Perhaps because of that, perhaps because of my laziness, I have been postponing my updates of Wikimedia websites for over five years by now. However, in the light of recent vulnerability revelations, I have finally decided to upgrade my installations and started trying to <a class=\"read-more\" href=\"https:\/\/andreikucharavy.com\/L3Cache\/how-to-upgrade-mediawiki-2018\/\">[&hellip;]<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[],"class_list":["post-346","post","type-post","status-publish","format-standard","hentry","category-prog"],"_links":{"self":[{"href":"https:\/\/andreikucharavy.com\/L3Cache\/wp-json\/wp\/v2\/posts\/346"}],"collection":[{"href":"https:\/\/andreikucharavy.com\/L3Cache\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/andreikucharavy.com\/L3Cache\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/andreikucharavy.com\/L3Cache\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/andreikucharavy.com\/L3Cache\/wp-json\/wp\/v2\/comments?post=346"}],"version-history":[{"count":3,"href":"https:\/\/andreikucharavy.com\/L3Cache\/wp-json\/wp\/v2\/posts\/346\/revisions"}],"predecessor-version":[{"id":362,"href":"https:\/\/andreikucharavy.com\/L3Cache\/wp-json\/wp\/v2\/posts\/346\/revisions\/362"}],"wp:attachment":[{"href":"https:\/\/andreikucharavy.com\/L3Cache\/wp-json\/wp\/v2\/media?parent=346"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/andreikucharavy.com\/L3Cache\/wp-json\/wp\/v2\/categories?post=346"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/andreikucharavy.com\/L3Cache\/wp-json\/wp\/v2\/tags?post=346"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}