Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Run the MediaWiki update script from your browser

This guide shows how to finish a MediaWiki upgrade using the web updater, with no command line.

CMS and Apps2 min read11 steps

Why do you need an update script?

MediaWiki is the program behind many wikis. A wiki is a website that many people can edit. When you move to a new MediaWiki version, the new files may need changes in your database. A database is the filing cabinet that holds your wiki pages. The update script makes these changes. If you skip it, your wiki may show errors.

Warning: Take a backup of your wiki files and your database before you start. An update that goes wrong can break the wiki.

Before you start

  1. Back up the wiki folder and the database. Your hosting control panel has tools for this.
  2. Download the new MediaWiki package from the official website.
  3. Copy the new files over the old ones on your server. Keep your old LocalSettings.php file and your images folder. They hold your settings and uploads.

Steps

  1. Open your browser.
  2. Go to your wiki folder address followed by /mw-config/. For example: https://example.com/wiki/mw-config/
  3. The installer page shows that a wiki is already installed and offers an upgrade. Click upgrade the existing installation.
  4. The page asks for an upgrade key. Open LocalSettings.php in your file manager.
  5. Find the line that begins with $wgUpgradeKey. Copy the text inside the quote marks.
  6. Paste it into the browser box and click Continue.
  7. Follow the screens. Click Continue each time. The script updates the database.
  8. When you see a message that the upgrade is complete, click the link to open your wiki.

If your file has no $wgUpgradeKey line, the page will tell you where to find or add one. You can also move the LocalSettings.php file away for a moment. Do this only if the page tells you to, and always keep a copy.

After the upgrade

  • Open a few pages and make sure they load.
  • Try logging in and editing a page.
  • Delete or rename the mw-config folder if you want, so others cannot open it.

Quick recap

  • The update script changes your database to fit a new MediaWiki version.
  • Back up first.
  • Open /mw-config/ in the browser and click to upgrade.
  • Enter the key from $wgUpgradeKey in LocalSettings.php.
  • Check your wiki when it finishes.