Skip to content

Manage services

Releasev0.35.0 · cfeceb67

Watch it in action

Stop, resume and inspect an environment

Services share common lifecycle commands. For example:

Terminal window
mw dev memcached create
mw dev memcached stop
mw dev memcached start
mw dev memcached destroy

destroy removes containers and service data. Use stop to keep data for later. Some services also provide tools such as mw dev mediawiki composer, fresh and quibble, or mw dev redis redis-cli. Check mw dev SERVICE --help for the commands available.

For optional OpenSearch Dashboards log browsing, see local logs.

Show the generated Compose configuration or inspect a service’s source file:

Terminal window
mw dev compose config
cat "$(mw dev where)/compose/memcached/compose.yml"

Set a context variable and recreate the affected service to apply it:

Terminal window
mw dev env set MEDIAWIKI_XDEBUG_CONFIG "client_host=172.21.112.105"
mw dev mediawiki create

Use the address of your debugger. See PHP debugging for more examples.

Inspect the current image, or select a compatible replacement:

Terminal window
mw dev mediawiki image get
mw dev mediawiki image set REGISTRY/IMAGE:TAG
mw dev mediawiki create

Reset the override with mw dev mediawiki image reset, then recreate the service. See custom Dockerfiles to build your own image and apply changes with rebuild.

mw dev stop (alias suspend) records the running services before stopping them. mw dev start (alias resume) resumes that saved set. Services stopped beforehand and completed one-shot setup containers stay stopped. Repeating stop preserves the record; repeating start with nothing left to resume is a no-op.

Service create/start/stop/destroy commands update an existing record. mw dev restart targets running services; global destroy removes the record. Direct Docker or Compose commands bypass this tracking. State is separate for each context.

An older context with no saved stop record initially starts its exited or created services. Its first global stop establishes the selective resume set.

For a quick environment check, inspect the Compose services and recent web logs after starting:

Terminal window
mw dev start
mw dev compose ps
mw dev compose logs -- --tail=20 mediawiki-web

Use mw dev restart to restart the currently running services. mw dev stop preserves the service set so mw dev start can resume it later.


Read this guide offline with mw help guides dev services.

Adapted from MediaWiki.org under CC BY-SA 4.0; see the linked page history for contributors.

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.