Skip to content

mw dev redis

Releasev0.35.0 · cfeceb67

Using this service will automagically configure (but not use) an object cache in MediaWiki

$wgObjectCaches['redis'] = [
'class' => 'RedisBagOStuff',
'servers' => [ 'redis:6379' ],
];

To expose the Redis service locally, you can set the REDIS_PORT_6379 environment variable to a port on your host machine.

For example, to expose the Redis service on port 6379:

Terminal window
mw dev env set REDIS_PORT_6379 6379
mw dev redis create
-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
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.