Skip to content


Preventing MediaWiki from revealing your server versions

MediaWiki features a special page, Special:Version, which displays MediaWiki’s license, but also a list of the currently installed extensions (with their version), as well as the versions of MediaWiki, PHP and MySQL. For security reasons, you may want to avoid displaying all these versions. As far as I know, no setting can disable the display of versions. But you can directly edit MediaWiki’s source to do so, which is quite straightforward:

1. Open “includes/specials/SpecialVersion.php” with a text editor

2. Find the lines:
$this->softwareInformation() .
$this->extensionCredits();

3. Comment out the lines you want to hide (the first one is for MediaWiki, PHP and MySQL; the second one for the extensions), for instance if I want to only hide MediaWiki, PHP and MySQL versions, the new code is:
//$this->softwareInformation() .
$this->extensionCredits();

4. Upload the new file to your server.

That’s it. Don’t forget to reapply this “patch” every time you upgrade MediaWiki though!

Posted in MediaWiki, web development.


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.

*