< Cli < guide < Docker-Development-Environment

The development environment automatically sets various MediaWiki settings, such as database details.

It does this by using a shim at the top of LocalSettings.php.

The Shim

The most basic LocalSettings.php file for you environment, that only includes the shim, looks like this:

<?php
//require_once "$IP/includes/PlatformSettings.php";
require_once '/mwdd/MwddSettings.php';

This will load a file that sets various settings. https://gitlab.wikimedia.org/repos/releng/cli/-/blob/main/internal/mwdd/files/embed/mediawiki/MwddSettings.php

For example:

  • $wgServer
  • $wgDBname
  • $wgDBservers
  • $wgSMTP
  • $wgObjectCaches
  • etc...

Further configuration

You should should include any further settings after the shim, and you can override anything that the shim has previously set.

For example:

<?php
//require_once "$IP/includes/PlatformSettings.php";
require_once '/mwdd/MwddSettings.php';

wfLoadSkin('Vector');

wfLoadExtension( 'BoilerPlate' );
$wgBoilerPlateVandalizeEachPage = true;

$wgEnableParserCache = false;

Existing configuration

If you are moving from an existing MediaWiki configuration, take a look at the shim and remove things such as DB settings that will automatically be set.

Add the shim to the top of your file, and you should be set!

FAQ

Why is PlatformSettings.php commented out?

The string was at some point expected in LocalSettings.php by some part of the release engineering development docker images, so the comment was added. It may no longer be needed and may be removed in the future.

This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.