I run a relatively small wiki using MediaWiki hosted on a Dreamhost server. Generally, I like to stay on top of upgrades for the security patches, new features, and bug fixes but the manual upgrade process makes me nervous.
I’ve been burned from nightmare Drupal CMS upgrades in the past. Losing hours of my life to troubleshooting and rebuilding is not something I ever want to repeat.
Anyway, I’ve procrastinated for a while now on this MediaWiki upgrade. I finally decided to jump in this week and get it done. I thought I would share the process I used, which is not exactly the recommended process on the MediaWiki website, but I found it easy and straight forward.  I successfully avoided the command line, which makes me somewhat nervous and certainly not in my comfort zone.
I enjoy website building and have confidence that I can teach myself almost anything, but I like to keep things simple when I can. I’m sure some people find command line simple and the “best practice”, I get that…I’m just not there yet.
NOTE: My installation is straight MediaWiki, with almost no extensions in an effort to keep things simple and easier to upgrade. If you have customized your MediaWiki and installed extensions, your upgrade process will be different.
Again, I’m no expert, but here’s the X simple steps I used to upgrade my MediaWiki installation successfully:
1. BACKUP
Thou Shalt Backup ALL thy site files before proceeding with the upgrade process! I won’t spend much time on this, but you need to backup ALL the MediaWiki files on the web server and also the MediaWiki database. This process is well documented on the MediaWiki.org website (click here).
I downloaded my MediaWiki site files via FTP to my local workstation. This took a while, there’s thousands of files in a MediaWiki. I then exported the Database via MySQL phpMyAdmin (see instructions here).
2. Download Latest MediaWiki Version
Visit the MediaWiki.org website and download the latest version. Then open and unpacked the files so you have them ready to upload to the web server.
3. Upload Site Files via FTP
Before upload the files, go ahead and rename the “LocalSettings.php” file on the web server to something like “LocalSettings-SAVE.php”. This will prevent the file from being overwritten when you upload the new MediaWiki files.
I uploaded the new MediaWiki files via FTP and let it overwrite the existing files. Your images, data, and other material should not deleted in this process, it will only overwrite system files that came with the new version, leaving your images and other data alone. This step will take a while due to the large number of files involved.
4. Installation
Once the upload process is complete, go ahead and access the site by entering the site URL into a web browser (ie. http://wiki.domain.com). You should see the install page, as if this was a first time wiki install.
Go ahead and go through the setup process and enter in all the database information. If you forgot any of the database names, passwords, etc. you can find them in the LocalSettings-SAVE.php file you just renamed.
Once complete the MeidaWiki will recognize the existing database and update everything for use with your data.
5. Cleanup & Fixing Errors
Almost done! You can now delete the newly-generated LocalSettings.php file and rename the old file “LocalSettings-SAVE.php” back to “LocalSettings.php”.
This should complete the upgrade process.
I ran into a few error messages, all were easy fixes. The old skins were not compatible with the new update, I simply went into the skins folder via. FTP and deleted all the old ones, problem solved.
Hope this helps, Work the Wiki!
Leave a Reply