Manual:PlatformSettings.php
MediaWiki file: PlatformSettings.php | |
---|---|
Location: | /includes |
Source code: | not in Git (Only applicable to installations as part of platforms) |
Classes: |
PlatformSettings.php is a standardized and recommended way for re-distributors and packagers of MediaWiki to be able to tune DefaultSettings.php as appropriate. [1]
If includes/PlatformSettings.php exists, the installer will automatically include it as part of the generated LocalSettings.php.
The main advantage of this system is that if the distributor wants to change the default settings, all users will benefit immediately. And if people want a vanilla MediaWiki experience, they can just remove the inclusion from their LocalSettings.php.
An example of the use of the file is the "Debian" logo on mediawikis installed via the Debian packages.
Generally the installer will detect if this file is present, and if so ensure it is included by LocalSettings.php. If overriding a setting from PlatformSettings.php, your override has to be at the bottom of LocalSettings.php. Be advised that sometimes distributions include settings inside an extension function in which case your override will also have to be in an extension function.
See also
edit- This file implements Requests for comment/PlatformSettings.php
- RFC on Phabricator