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.

2. Clone MediaWiki
Use Git to clone the MediaWiki core repository and the Vector skin.

Cloning MediaWiki takes a few minutes. While you're waiting, create a Wikimedia developer account if you don't already have one, and get started setting up Wikimedia Gerrit (to send patches to Gerrit, you need to set up Git and add an SSH key to your Gerrit account).

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 browse localhost:4000 to see your MediaWiki instance.

Next steps

 * Take a tour of the MediaWiki codebase – Familiarize yourself with MediaWiki's core code by learning about entry points and top-level directories.
 * Run unit tests – MediaWiki uses the PHPUnit framework for unit and integration testing of PHP code. Read the docs to run tests and find information about writing tests.
 * Install extensions – Add extensions, like Visual Editor and Echo, to your development environment. See Manual:Developing extensions to learn about how extensions work.
 * Debug your code – Learn how to configure debugging aids, and debug MediaWiki code step-by-step with XDebug.
 * Submit a patch – Explore good first bugs, and set up access to Wikimedia Gerrit to submit a patch.