Local development quickstart

This page is a quickstart guide to setting up a local development for MediaWiki using PHP and Composer.

1. Install prerequisites
MediaWiki requires PHP 7.4.3+ and Composer 2.

Ubuntu/Debian

On Ubuntu 22+ and Debian 11+, you can install the required packages using APT.

On Ubuntu 20, install PHP using apt, and install Composer 2 using the documented process.

Fedora

On Fedora 35+, you can install the required packages using DNF.

Mac

You can install the required packages using Homebrew.

Windows

You have to option to use the Windows Subsystem for Linux and follow the Linux instructions on this page. Or, to install MediaWiki directly on Windows, you can install the required packages using Chocolately.

To load the required PHP extensions, edit your php.ini file, and uncomment the following lines. To find the location of php.ini, run, and look for Loaded Configuration File.

2. Clone MediaWiki
Use git to clone the MediaWiki core repository and the default skin.

If you already have an SSH key set up for Wikimedia Gerrit, clone MediaWiki using SSH. If not, you can clone the repository using HTTPS and set up an SSH key once you're ready to submit a patch.

Using SSH

Using HTTPS

While you're waiting, create a Wikimedia developer account if you don't already have one, and get started setting up Wikimedia Gerrit.

3. Install dependencies
From within MediaWiki's root directory, use Composer to install MediaWiki's dependencies.

4. Install MediaWiki
Install MediaWiki with PHP's built-in SQLite database.

5. Start server
Start PHP's built-in webserver, and open localhost:4000 to see your MediaWiki instance.

Next steps
[WIP: See User:APaskulin (WMF)/Sandbox/Code Jam]