A wiki of your own

Install MediaWiki for practice: requirements and steps

To install MediaWiki you need a web server, PHP and a database. The current release, 1.46.2, needs PHP 8.3.0 or newer and works best with MariaDB; the long-term support branch is 1.43. On your own copy you hold every right, so nothing is off limits.

Updated 3 min read
On this page
  1. Which version to install (October 2026)
  2. What MediaWiki 1.46 needs
  3. Installing on Debian or Ubuntu
  4. On Windows or macOS, or without a server
  5. What to practise on your own wiki
  6. Frequently asked questions

Which version to install (October 2026)

For practice, install the current stable release: it matches what most wikis are moving to. Choose the long-term support branch only if you must run on an older PHP.

MediaWiki branches in October 2026 (from mediawiki.org's Version lifecycle page and the release tags)
BranchLatest releaseStatusSupported until
1.47 (LTS)—Due November 2026November 2029
1.461.46.2Current stable, released 30 June 2026July 2027
1.451.45.6Legacy stableDecember 2026
1.441.44.6ObsoleteEnded 31 July 2026
1.43 (LTS)1.43.11Long-term supportDecember 2027

What MediaWiki 1.46 needs

  • A web server, such as Apache.
  • PHP 8.3.0 or later with the ctype, dom, fileinfo, iconv, intl, mbstring and xml extensions. The 1.43 LTS branch accepts PHP 8.1.0 or later.
  • A database: MariaDB 10.3 or higher is recommended; MySQL 5.7.0, PostgreSQL 10 and SQLite 3.8.0 or later also work, though their support is described as less mature. SQLite needs no database server at all.
Which Linux releases ship a new enough PHP for MediaWiki 1.46
SystemPHP in its packagesMediaWiki 1.46
Ubuntu 24.04 LTS8.3Yes
Debian 138.4Yes
Debian 128.2No: use 1.43 LTS, or upgrade the system
Ubuntu 22.04 LTS8.1No: use 1.43 LTS, or upgrade the system

Installing on Debian or Ubuntu

These steps follow mediawiki.org's manual for Debian and Ubuntu, with the stable release of October 2026. Run them as a user with sudo rights.

  1. Update the system: sudo apt update && sudo apt upgrade.
  2. Install Apache, MariaDB and PHP: sudo apt-get install apache2 mariadb-server php php-mysql libapache2-mod-php php-xml php-mbstring. Add php-intl, which MediaWiki 1.46 lists as required, and php-apcu for caching.
  3. Download and unpack the release: wget https://releases.wikimedia.org/mediawiki/1.46/mediawiki-1.46.2.tar.gz, then tar -xvzf mediawiki-1.46.2.tar.gz.
  4. Move it into place with sudo mv mediawiki-1.46.2 /var/lib/mediawiki, and link it into the web root with sudo ln -s /var/lib/mediawiki /var/www/html/mediawiki.
  5. In MariaDB (sudo mysql -u root -p), create a database with CREATE DATABASE my_wiki;, create a user with a strong password, and grant that user all privileges on my_wiki.
  6. Open http://localhost/mediawiki in a browser and follow the installer. Watch its Checking environment step: it names any missing piece.
  7. At the end the installer offers a LocalSettings.php file to download. Save it in /var/lib/mediawiki; the wiki works from that moment.

Your first account is already an admin The administrator account you create in the installer can do everything: delete, protect, block, grant rights and edit the interface. Practise with it, and make a second, ordinary account to see what other users see.

On Windows or macOS, or without a server

  • All-in-one bundles. XAMPP or MAMP put a web server, PHP and a database in one download. Check the bundled PHP before you start: in May 2025 XAMPP shipped PHP 8.2, enough for the 1.43 LTS branch but not for 1.46.
  • A quicker local setup. mediawiki.org's Local development quickstart sets up a wiki for development with less configuration than a full server.
  • A hosted wiki. A wiki farm runs the server for you, and mediawiki.org keeps a list of hosting services. You become administrator of your own wiki, but usually cannot change the server's settings or add extensions of your choosing. For trying the tools only, admin test wikis need no setup at all.

What to practise on your own wiki

  • Settings. Every option lives in LocalSettings.php. Change one, reload, and see what it does.
  • Extensions. Some come bundled with the download; switch one on with wfLoadExtension( 'Name' ); in LocalSettings.php. Scribunto, for Lua modules, is one of them.
  • Templates. Import or write templates and test them with sandbox and test-case pages, just as on Wikipedia.
  • Upgrades. Back up the database and files first, put the new release's files in place, then run the update script (php maintenance/run.php update).

Keep a public practice wiki up to date A wiki reachable from the internet needs security releases. mediawiki.org advises every wiki operator to subscribe to the mediawiki-announce mailing list and run the newest version they can. A wiki that runs only on your own computer carries much less risk.

Frequently asked questions

What do I need to install MediaWiki?

A web server, PHP and a database. MediaWiki 1.46 needs PHP 8.3.0 or later; MariaDB is the recommended database, and SQLite works without a database server.

Which MediaWiki version should I install in 2026?

The current stable release, 1.46.2 in October 2026. If your system only has PHP 8.1 or 8.2, use the long-term support branch 1.43 (1.43.11), supported until December 2027.

Can I install MediaWiki on my own computer?

Yes. On Linux install Apache, MariaDB and PHP from the package manager; on Windows or macOS use a bundle such as XAMPP or MAMP with a new enough PHP.

Am I an administrator on a wiki I install?

Yes. The account you create during installation holds administrator and bureaucrat rights, so you can practise every tool and grant rights to other accounts.

Keep reading

Wiki Practice Guide is an independent guide. It is not run by or affiliated with the Wikimedia Foundation, Wikipedia, MediaWiki.org, any test wiki it describes (including The Test Wiki, once hosted at wiki.xyrael.net) or any previous owner of this domain.