System requirements
MediaWiki 1.46.0 requires:PHP
PHP 8.2.0 or higher with the following extensions enabled:
ctype, dom, fileinfo, iconv, intl, json, libxml, mbstring, openssl, xml, xmlreaderDatabase
One of:
- MariaDB 10.3+
- MySQL 5.7.0+
- PostgreSQL 10+
- SQLite 3.31.0+
Web server
Any web server capable of running PHP: Apache 2, Nginx with PHP-FPM, or PHP’s built-in server (for development only).
Composer
Composer 2 for dependency management. All PHP dependencies are declared in
composer.json and must be installed before MediaWiki will run.On 32-bit systems, either the
bcmath or gmp PHP extension is also required. These extensions are also needed for scrambling Temporary Accounts on any architecture.| Extension | Purpose |
|---|---|
ext-apcu | Faster web responses via in-memory caching |
ext-curl | Faster HTTP client (InstantCommons, Swift, Etcd) |
ext-gd | Image thumbnail generation for file uploads |
ext-mysqli | MySQL/MariaDB database driver |
ext-pdo | SQLite database driver |
ext-pgsql | PostgreSQL database driver |
Two setup paths
Docker setup
Clone and install dependencies
Clone the MediaWiki repository and install all Composer dependencies. The
composer install step fetches all packages declared in composer.json, including Wikimedia libraries, Parsoid, OOjs UI, and development tooling.Configure the environment
The Docker Compose setup reads from a The
The repository root is mounted at
.env file. Create one manually (there is no .env.example):Windows users: leave
MW_DOCKER_UID and MW_DOCKER_GID blank in the .env file.docker-compose.yml defines three services:| Service | Image | Role |
|---|---|---|
mediawiki | bookworm-php83-fpm:1.0.0-s1 | PHP 8.3 FPM application server |
mediawiki-web | bookworm-apache2:1.0.1 | Apache 2 reverse proxy, port 8080 |
mediawiki-jobrunner | bookworm-php83-jobrunner:1.0.0-s1 | Background job runner |
/var/www/html/w inside each container. SQLite data and logs are stored in the cache/ directory.Install MediaWiki
First install Composer dependencies inside the container, then run the install script:
Windows users: the install script must be run from PowerShell, not Bash.
Verify the installation
Open http://localhost:8080/w/index.php in your browser. You should see the MediaWiki main page. Log in with username
Admin and password dockerpass.Confirm the Action API responds:Manual install with composer serve
Run the SQLite installer
The This is equivalent to:The
mw-install:sqlite Composer script runs the CLI installer with flags suited for local development:--with-developmentsettings flag enables verbose errors and the debug toolbar. The SQLite database file is created in cache/.Start the development server
http://127.0.0.1:4000 with 8 worker processes (PHP_CLI_SERVER_WORKERS=8). Logs are written to logs/ and mirrored to stderr.Verify the installation
Open http://127.0.0.1:4000 in your browser. Log in with username Test the REST API:
Admin and password adminpassword.Test the Action API:Development environment
After the basic install, a few more steps give you a complete development setup:Run the unit test suite
PHPUnit is included in the dev dependencies. Run the unit tests (no database required):Run the full test suite (requires a database):
