Project:Development environments

This page coordinates the documentation of MediaWiki development environments on MediaWiki.org

Comparison

Editable on Project:Development_environments/compare this table tries to give an easy reference overview to the difference between the various development environments.

Feature MediaWiki Docker mwcli docker MediaWiki Vagrant Local (manual) Local (quickstart)
Setup Time[1] ~15 min Varies ~20 min[2] Varies ~7 min
Docs[3] DEVELOPERS.md

MediaWiki-Docker

CLI (command ref)

First Setup

MediaWiki-Vagrant Manual:Installing MediaWiki Local development quickstart
Source gerrit:mediawiki/core

docker-compose.yml

gitlab:releng/cli gerrit:mediawiki/vagrant
Powered by docker compose docker compose VirutalBox Bare Metal Bare Metal
Updating With mediawiki core repository With mwcli update command
Requirements
Software
docker Yes Yes
Cloned MediaWiki core Yes Will help you clone it if missing Yes Yes
VirtualBox Yes
Vagrant Yes
php Yes Yes
composer Yes Yes
webserver Yes
Database Yes
Hardware
Operating System Linux, macOS, or Windows Linux, macOS, or Windows Linux, macOS, or Windows Linux, macOS, or Windows Linux, macOS, or Windows
Processor 64-bit x86 processor
Memory 4 GiB[4]
Disk 10–12 GB
Features
MediaWiki
Apache ✅ (commonly used) ❌ (uses PHP built-in server)
php-fpm
jobrunner [5] [6]
Abilities
Multisite [7] [8]
XDebug [9] [10]
Includes quibble
Includes fresh
Includes composer
VueSSR
Shellbox
ORES [11]
Poolcounter [11]
RestBase [11]
Additional and Optional Services
Database & Storage
MySQL (primary) [12]
MySQL Replica [13]
PostgreSQL [14]
SQLite ✅ (default)
Redis [15]
Memcached [16] [11]
Kafka [11]
Thumbor [11]
Logging & Monitoring
EventLogging [17] [11]
EventGate [18] [19]
Graphite
statd [11]
Jaeger
ELK (ElasticSearch, Logstash, Kibana) [11]
Search
Elasticsearch / OpenSearch [20]
Authentication
Keycloak
Admin & Debug Tools
SQL interface ✅(phpMyAdmin / Adminer)
Mail [21] (Mailhog) ✅(Mailhog) ✅(Mailcatcher)[22]
Wikidata Query Service
WDQS
WDQS UI
Networking
Envoy [23]
Nginx
DNS
Other
Phabricator [11]

Key pages

How to become a MediaWiki hacker

  • Main on-wiki page for setting up a development environment, via Developer hub
  • Covers how to "learn the basic skills needed to contribute to development"
  • Covers these options:
    • MediaWiki Docker: "setup a MediaWiki installation quickly and are not planning on installing many extensions."
    • mwcli: "sets up Docker with a few simple commands and provides basic orchestration functionality between MediaWiki, MySQL, ElasticSearch, Memcached, and other types of containers"
    • MediaWiki Vagrant: "saves you installation and configuration time compared to manually adding extensions in a Docker or local installation, but it runs a bit slower"
    • Local installation: "will take much more time to set up than Docker or Vagrant"
  • Links to (among others):

DEVELOPERS.md

  • Main off-wiki page for setting up a development environment
  • Only covers MediaWiki-Docker: "an extendable local development environment based on Docker Compose. This environment provides PHP, Apache, Xdebug and a SQLite database"
  • Links to How to become a MediaWiki hacker
  • Not translatable
  • Next steps after setup:
    • Shell into container
    • Run PHPUnit tests
    • Run Selenium tests
    • Run API integration tests
    • Install Vector skin
    • Install EventLogging extension
    • Run Xdebug

MediaWiki-Docker

Research

Developer_Satisfaction_Survey/2025/Developer environments

  • Satisfaction – Respondents are satisfied with Docker-based environments, much like last year
  • Docker-based development environments are still missing the ability to make "wikifarms". (Note by Addshore: This isn't really true...)
  • Too many things: I would love there to be fewer semi-supported environments, so when helping people we're almost all starting from the same place
  • Wikifarm difficulty: MediaWiki-Docker does not make wikifarms and other non-trivial configuration management easy. MediaWiki-Vagrant worked hard to replace "read a wiki page" with deployment tooling, but that goal seems to have not carried forward into the defacto successor dev environment.

Developer Satisfaction Survey/2024/Developer environments

  • Tenure – Respondents with less than 3 years of tenure use MediaWiki Docker, respondents who've been around longer use a self-created environment.
  • Satisfaction – People are satisfied with Docker-based environments, generally.
  • Docker-based environments offer little support for setting up extensions.
    • Setting up MediaWiki core can be very simple (from my experience with a Mac), but it's installing some extensions where it gets tricky.
    • MW-Docker is great, I love it. The only downside is that there's no automation for installing hard-to-install extensions.
  • Many responses mentioned the need for “production-like” environments. Of course, production-like means different things to different people.
    • Its' difficult to get a production like environment set-up locally especially the wiki-family setup and jobqueue.
    • It would be great if it was easier to setup "test Wikis" that have features similar to English Wikipedia.
    • Until there is a standard test environment for MediaWiki deployments that include microservices in Kubernetes, we will continue to suffer these kinds of bugs.

Developer Satisfaction Survey/2023/Developer environments

  • "My biggest issue with our dev environments is the fragmentation"
  • Comments about dev environment documentation: negative:6; positive: 0
  • "Ease of use" was the number one priority for dev environments. The most common "other" priority was using a debugger. In contrast, portability was ranked low as a priority.
  • 57 people reported using a Docker-based environment, while 45 people reported using a "self-created environment".

Developer Satisfaction Survey/2021/Categories/Local development

  • Top 3 agrees / storng sgrees
    • I prefer working with command-line tools (49)
    • I prefer working with docker-compose (37)
    • I prefer working with docker (36)
  • Top 3 disagrees / strong disagrees
    • Using CLoud VMs (29)
    • Using local VMs (27)
    • LAMP/WAMP/MAMP (21)

Developer Satisfaction Survey/2020#Local Development Environment

  • The most common theme was that respondents wanted a simple, fast, and easy to use environment. More respondents selected a docker-based environment to get this result
  • Many respondents are comfortable with what they know, so don’t try out new development environment solutions
  • The most common response was that respondents didn't know about the efforts to improve the developer environment or didn’t notice anything, while a few expressed feeling like improvements were being made.
  • Most requested features were improved ability to run tests, more documentation, more standardization, and access to production-like content when testing.

Developer Satisfaction Survey/2019#Developing

  • local dev environment is slow and hard to use - 1
  • make documentation easier to access?
  • enable quick and easy production-like testing environments for developers?
  • make the local development environment easier to setup?
  • make the local dev env easy to configure and use?
  • make easily shared environments?
  • help non-devs have an environment?
  • decrease resource usage?
  • achieve more parity with production?

Cloning MediaWiki

It's generally recommended to follow the specific guides for each development environment, as many already cover core topics such as cloning MediaWiki core.

Requires git

# full clone into a mediawiki directory
# ~2-5 minutes, ~870 MB
git clone https://gerrit.wikimedia.org/r/mediawiki/core.git mediawiki

# clone with SSH
git clone git clone ssh://gerrit.wikimedia.org:29418/mediawiki/core mediawiki

# configure SSH after cloning
git remote set-url origin ssh://YOUR_GERRIT_USERNAME@gerrit.wikimedia.org:29418/mediawiki/core

# shallow clone
# ~15 seconds, ~205 MB
# Faster but not suitable for development
git clone --depth 1 https://gerrit.wikimedia.org/r/mediawiki/core.git mediawiki

Installing a skin

If you clone Vector after installing MediaWiki, you must add wfLoadSkin( 'Vector' ); to LocalSettings.php.

If you clone Vector before installing MediaWiki, the install script automatically updates LocalSettings.php.

References