How to Install MediaWiki Extensions – Complete Beginner Tutorial

Learn how to install MediaWiki extensions step by step. A complete guide for beginners to enhance their wiki functionality safely and easily.

Wiki Tutorials

How to Install MediaWiki Extensions – Complete Beginner Tutorial

By WikiTools Team
Coding on a laptop screen showing php code

MediaWiki is powerful out of the box, but its real strength lies in its extensibility. Whether you want to add a visual editor, spam protection, or advanced citation tools, extensions are the key. However, unlike modern CMS platforms like WordPress, installing extensions in MediaWiki often requires manual file management and code editing.

This guide will walk you through the process of installing MediaWiki extensions step by step. By the end, you'll be able to customize your wiki to fit your exact needs. If you are still deciding on the right platform, check out our Best Wiki Software Comparison to see if MediaWiki is truly the best fit for your team compared to easier tools like Notion.

Prerequisites

Before we begin, ensure you have:

  • FTP/SFTP Access: You need to be able to upload files to your server.
  • Text Editor: A code editor like VS Code or Notepad++ to edit PHP files.
  • Administrator Access: You need full rights to your MediaWiki installation.
  • Backup: Always backup your LocalSettings.php file before making changes.

Need a reliable server?

MediaWiki requires a solid hosting environment. We recommend Hostinger VPS for excellent performance and root access, which makes managing extensions much easier.

Step 1: Download the Extension

First, navigate to the official MediaWiki Extension Distributor. Extensions are usually distributed as tarballs (.tar.gz).

  1. Search for your desired extension (e.g., "VisualEditor").
  2. Select your version of MediaWiki. It is critical to match the version exactly to avoid compatibility errors.
  3. Download the file to your local computer.
Server data cables and infrastructure

Step 2: Upload to the Extensions Directory

Once downloaded, you need to place the extension files on your server.

1. Connect to your server using your FTP client (like FileZilla).
2. Navigate to your MediaWiki installation folder (often public_html/wiki).
3. Open the extensions/ directory.
4. Upload the unzipped folder of your extension here.

Note: Ensure the folder name matches the extension name exactly. For example, the directory should be extensions/VisualEditor/, not extensions/VisualEditor-1.35/.

Step 3: Register the Extension in LocalSettings.php

Uploading the files isn't enough; you must tell MediaWiki to load them.

1. Locate the LocalSettings.php file in the root of your MediaWiki installation.
2. Download it to your computer and open it with your text editor.
3. Scroll to the bottom of the file.
4. Add the following line:

              wfLoadExtension( 'ExtensionName' );
            

Replace 'ExtensionName' with the actual name of your extension (e.g., 'VisualEditor').

Step 4: Run the Update Script (If Required)

Some complex extensions require changes to the database schema. If your extension documentation mentions this, you will need to run the maintenance script.

You can do this via SSH:

              php maintenance/update.php
            

This script will automatically create any necessary database tables for the new extension.

Troubleshooting Common Issues

White Screen of Death

If your wiki stops loading after adding the line to LocalSettings.php, you likely have a syntax error or a version mismatch. Remove the line you added to restore access, then double-check the compatibility.

Debugging code on a computer screen

Extension Not Showing in Special:Version

Navigate to the Special:Version page on your wiki. If your extension isn't listed there, MediaWiki isn't loading it. Check your file path in the extensions/ directory.

Alternative: Cloud-Hosted Wikis

If this process sounds too technical or risky for your team, you might be better off with a cloud-hosted wiki solution. Tools like ClickUp and Notion handle all updates, security, and feature additions for you automatically.

Check out our comprehensive guide on wiki software to explore easier alternatives that don't require PHP knowledge.

Master Your Knowledge Base

Don't let technical hurdles slow down your team's documentation.

Compare Easier Wiki Tools