How to update MediaWiki

You can keep your MediaWiki up to date by upgrading the application with the latest stable release. New versions have fixes for bugs and different improvements, including in terms of security.

Free Application Upgrade from HostKnox - get a MediaWiki hosting plan and we'll upgrade MediaWiki for you at no additional cost.

HostKnox customers can request a free upgrade by submitting a ticket to our support team.

In this article we'll outline the major steps you have to take to upgrade your MediaWiki. For some more details check out the tutorial on how to upgrade MediaWiki.

You can check what your current version is from the frontend of your MediaWiki site. Go to Special pages>Data and tools section>Version button. To see what the latest stable release is and to download it go to the download section of the official MediaWiki site.

To prepare for the upgrade and to do it you have to:

  • Make sure you have a recent backup of your site. Although this is not part of the upgrade itself, it is essential, so that if something goes wrong during the upgrade, you can restore the site. Back up the files of your MediaWiki by downloading them to your local computer and/or creating an archive with copies of the files and transferring that archive to another folder on your MediaWiki hosting account. You can do this with an FTP client, from the Files section of the Pixie control panel, or via SSH. Then back up the database by exporting it. You can do this with phpMyAdmin or via SSH.

  • Download the new version of MediaWiki from the download section of the official site.

  • Upload the new version to your hosting account. You can upload it in the folder with the old version and overwrite the old files. Another way to proceed is to upload it in a new folder, then transfer only the necessary files from the old version to the folder of the new one, delete or rename the folder of the older version and rename the one with the new version using the name of the folder in which the old version was stored (so that the upgraded site is accessible with the same URL address). If you choose the second method you have to transfer the LocalSettings.php file; if you have installed any skins and extensions other than the default ones, you have to transfer them respectively from the /skins and /extensions folders of the old version to the new one. If there are uploaded images you have to transfer them from the /images folder; you'll also have to transfer the logo (if you've changed the default one).

  • If you have installed any extensions other than the default ones that come prepackaged with MediaWiki, you have to check whether they'll work with the new version of the application. Depending on the extensions, some extensions may have to be upgraded so that they work with the new MediaWiki, or you can disable and uninstall them. To upgrade an extension simply download the new version and replace the old with the new one in the /extensions directory of your MediaWiki.

  • The last step of the upgrade is to update the database. You can either do this via SSH by executing the script update.php using the command php update.php. The script is in the maintenance directory of MediaWiki. The example command will work when the current working directory is changed to the maintenance directory; otherwise, you have to specify the path to the file. You can also upgrade the database with a web-browser. If the homepage of your MediaWiki site is, then access the URL and follow the instructions.

For more details read our MediaWiki upgrade tutorial.

Was this answer helpful?

 Print this Article

Also Read