Skip to content

mw dev mediawiki install

Releasev0.35.0 · cfeceb67

Watch it in action

Create a local MediaWiki environment
mw dev mediawiki install [flags]

Installs a new MediaWiki site using MediaWiki maintenance scripts:

The sequence of actions is as follows:

  1. Ensure we know where MediaWiki is installed
  2. Ensure a LocalSettings.php file exists with the shim needed by this development environment
  3. Ensure composer dependencies are up to date, or run composer install & composer update
  4. Move LocalSettings.php to a temporary location, as MediaWiki can’t install with it present
  5. Wait for any needed databases to be ready
  6. Run install.php
  7. Move LocalSettings.php back
  8. Run update.php

You can also run install.php and update.php manually, if you wish.

--dbname <string>
Name of the database to install (must be accepted by MediaWiki, stick to letters and numbers) Default: default.
--dbtype <string>
Type of database to install. One of mysql, postgres, sqlite (overriding config)
-c, --context <string>
Development context to use (overrides CONTEXT) Default: default.
--help
Help for this command
--no-interaction
Do not ask any interactive questions
-v, --verbose <count>
Increase output verbosity. Example: --verbose=2 or -vv
Terminal window
mw dev mediawiki install --dbtype=mysql # Install a MediaWiki site in a database called 'default' backed by MySQL
mw dev mediawiki install --dbname=enwiki --dbtype=mysql # Install a MediaWiki site in a database called 'enwiki' backed by MySQL
mw dev mediawiki install --dbname=thirdwiki --dbtype=postgres # Install a MediaWiki site in a database called 'thirdwiki' backed by Postgres
Report an issue with this page

Report a documentation issue

The report includes this page’s link, section and documentation version.

Review and submit on Phabricator, or run the command using your saved CLI profile. The command asks before creating the task.