# Install MediaWiki for practice: requirements and steps

> To install MediaWiki you need a web server, PHP 8.3 or newer and a database. Versions and requirements in October 2026, and a Debian or Ubuntu walk-through.

Canonical: https://xyrael.net/install-mediawiki
Updated: 2026-10-31

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.

## 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)**

| Branch | Latest release | Status | Supported until |
| --- | --- | --- | --- |
| 1.47 (LTS) | — | Due November 2026 | November 2029 |
| 1.46 | 1.46.2 | Current stable, released 30 June 2026 | July 2027 |
| 1.45 | 1.45.6 | Legacy stable | December 2026 |
| 1.44 | 1.44.6 | Obsolete | Ended 31 July 2026 |
| 1.43 (LTS) | 1.43.11 | Long-term support | December 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**

| System | PHP in its packages | MediaWiki 1.46 |
| --- | --- | --- |
| Ubuntu 24.04 LTS | 8.3 | Yes |
| Debian 13 | 8.4 | Yes |
| Debian 12 | 8.2 | No: use 1.43 LTS, or upgrade the system |
| Ubuntu 22.04 LTS | 8.1 | No: 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](/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](/lua-modules-scribunto), is one of them.
- **Templates.** Import or write templates and test them with [sandbox and test-case pages](/template-sandbox-testcases), 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.
