Pat's picture

Hi I have TurnKey MediaWiki version (13.0) which I upgraded to the latest version of mediawiki (1.23.5). All runs fine after the upgrade for a couple of days but then I get an error from extensin scrubinto saying version is too old (and I check the mediwiki version and it is back to the originial turnkey version of 1.19). Any ideas or where I should start looking to fix.

Roy Hernandez's picture


I've been thinking about upgrading my version of Mediawiki.  Would you be willing share your upgrade process?



Pat's picture

Hi I did document (relevant to my setup) it and this seems to have worked ok for me now.


Rename old to mediawikiOld (mv mediawiki mediawikiold
$ cd /path/to/your/new/installation/ (/usr/share) 
$ wget
$ tar -xvzf mediawiki-1.23.5.tar.gz 
$ rm mediawiki-1.23.5.tar.gz 
$ mv /usr/share/mediawiki-1.23.5 /usr/share/mediawiki
Copy files from old install (shortcuts only) to new, i.e copy (overwrite) all shortcuts (symbolic links)  mediwikiOld to mediwiki
Upgrade from web
Upgrade key is in /etc/mediawiki/LocalSettings.php -> $wgUpgradeKey
Copy images shortcut from mediawikiOld and overwrite directory in new install.
Jeremy Davis's picture

Ok this is going to be a long post... Sorry but to answer your question I really need to give you additional background info to help you understand the implications of your decision and help you decide whether that's really what you want...


Firstly, do really need to have a newer version of Mediawiki? Are there features that are unavailable or a plugin that you need that doesn't work with the included version? Or do you just want a newer version (because somehow you think it might be 'better'; 'latest and greatest...')? Are you concerned about security issue with an older version?

When the devs build the TurnKey appliances sometimes software is available from package management (i.e. pre-built Debian packages available from the repositories), sometimes not. When it's not it must be installed from upstream; but if there is a package in the Debian repos then the situation needs to be assessed and a decision made.

As a general rule, any software that is not undergoing heavy (rapid) development, is stable, feature complete (which can be relative and depends on perspective) and fairly common (might be a target for hackers) then using a package from package management is a great idea. The main advantage is that the package will receive automatic (backported) security patches as they are found and fixed. Also the version will be 'stuck' at the version number at release of the OS. This 'stuck' version can be a good thing (stability and predictability) or not such a good thing (non-security bugs, features missing that are in later versions).

Sometimes it is best to use software from upstream even if there is a version in the repos. Some of these reasons might be: serious bugs (fixed in a newer versions) or important features missing (that were added in later versions). One of the biggest downsides though of having upstream software installed is that you need to take care of updates yourself. This means that the potential for getting hacked is greater (as it is likely that you won't check everyday for security issues and update as soon as they are found) and you need to be on your toes more...

Often when people are new to Linux they do not understand the value of sticking with a version from the repos. If you have a valid reason to update to an upstream version then by all means go for it (and IMO "just because you want to" is valid, but only when you understand the full implications and are making an informed decision).

To answer original question...

So back to your original question regarding why your server keeps reverting to the 'old' version. This is because you are doing a 'naughty thing'! According to the Linux Filesystem Hierarchy Standard the /usr/ directory tree is "Secondary hierarchy for read-only user data; contains the majority of (multi-)user utilities and applications." In other words, it's for applications handled by package management and is not meant to be written to by the end user (it is intended to be read only for users; written to only by dpkg or package management tools).

So my suspicion is that there have been security updates recently released and they have auto installed (replacing your updated version).

Where to next then?

So to anticipate your next question... How do you resolve this issue?

Essentially there are 3 options:

  • Stick with the version of Mediawiki installed by default (best plan IMO - but only if possible)
  • Tinker with your current setup to make it stick (bad plan IMO)
  • Make a new server, with Mediawiki from upstream.

IMO sticking with the default is the best (and most secure) plan, but you may have a good reason not to do that...

So like I say, you could work around it and make the 'naughty' way you've done things stick (and make TKLBAM backups work too - which they won't currently because it observes the FHS and never backs up anything from /usr). But as that will open a whole can of worms (for you but probably even more-so for someone who comes along later and just reads that bit rather than the whole post) so if you want to go that way; you'll need to do some research and work it out yourself...

The only way I could recommend that you use an updated version of MediaWiki with TurnKey would be to start with the LAMP appliance instead and install the latest Mediawiki software to that. There is a thread from about a year ago that covers that scenario, with instructions and discussion. I suggest that you have a read through that. Also note that you'll need to manually migrate your data from your old server to the new one.

Pat's picture

Hi thanks for that awesome reply and that has helped a lot. The reason I was upgradine was because of an extension I wanted to use Extension:Scribunto - MediaWiki that needed later version of mediawiki

Jeremy Davis's picture

Glad that it was of use to you. So it sounds like an updated version of Mediawiki is what you'll need. Hopefully that thread I link to above will be helpful (assuming you go that way) - it's a little old but should still basically apply. If you have any issues just post... Good luck! :)

Add new comment