Introduction
MediaWiki is the wiki platform originally built for Wikipedia and now maintained by the Wikimedia Foundation. It is the most battle-tested wiki engine in existence, serving billions of page views per month across Wikipedia and its sister projects while remaining freely available for any organization to self-host.
What MediaWiki Does
- Provides collaborative page editing with wikitext markup and a visual editor
- Tracks every revision with full version history, diffs, and rollback capability
- Supports templates, transclusion, and parser functions for content reuse
- Handles file uploads with thumbnail generation and media galleries
- Exposes a comprehensive API for bots, data extraction, and integrations
Architecture Overview
MediaWiki is a PHP application backed by MySQL or MariaDB (with experimental PostgreSQL support). It uses a parser to convert wikitext into HTML, with Parsoid providing HTML-based round-trip editing for the visual editor. Memcached or Redis caches parsed pages and query results. JobQueue handles deferred tasks like link table updates and email notifications. At Wikipedia scale, the architecture adds Varnish caching, Elasticsearch (via CirrusSearch), and a CDN layer.
Self-Hosting & Configuration
- Requires PHP 8.1+, MySQL 5.7+ or MariaDB 10.4+, and a web server
- Docker images provide a quick setup for testing or small deployments
- Run the web-based installer to generate LocalSettings.php
- Install extensions by downloading to the extensions/ directory and adding a wfLoadExtension line
- Customize skins, permissions, and namespaces in LocalSettings.php
Key Features
- Visual Editor for WYSIWYG editing alongside traditional wikitext
- Over 1,000 community extensions for access control, semantic data, and more
- Structured Data support via Wikibase (the engine behind Wikidata)
- Multilingual content with the Translate extension
- Powerful search through CirrusSearch integration with Elasticsearch
Comparison with Similar Tools
- DokuWiki — file-based, simpler setup; MediaWiki scales to millions of pages
- Wiki.js — modern Node.js wiki with a polished UI; MediaWiki has a larger extension library
- BookStack — organized as books/chapters; MediaWiki uses a flat namespace model
- Confluence — commercial, team-focused; MediaWiki is free and community-driven
FAQ
Q: Is MediaWiki suitable for small teams? A: Yes, though it is designed for scale. Small teams may prefer a lighter wiki unless they need its extension ecosystem.
Q: Can I restrict editing to authenticated users? A: Yes. MediaWiki supports private wikis with read and edit restrictions via user groups.
Q: How do I keep MediaWiki updated? A: Download new releases, run update.php for database migrations, and update extensions individually.
Q: Does it support Markdown? A: Not natively. MediaWiki uses wikitext, but extensions exist to add Markdown support.