Jump to content

Manual:AdminSettings.php

From mediawiki.org
Revision as of 03:34, 9 October 2019 by Mikefndly (talk | contribs) (Admin password)

Details

The requirement for AdminSettings.php (along with supporting file AdminSettings.sample) was rudimentarily removed in MediaWiki 1.16. Prior to MediaWiki 1.16, AdminSettings.php was used to store database authentication credentials for maintenance scripts and to control the availability of profileinfo.php . It has finally been removed completely in MediaWiki 1.23.

Upgrading

If upgrading from a pre-1.16 version of MediaWiki to version 1.16 or later, the variables set in AdminSettings.php file can be safely removed.

Prior to 1.16[edit]

Manually create AdminSettings.php in the root directory of the MediaWiki installation.

Typically, this is done by renaming AdminSettings.sample to AdminSettings.php and then editing AdminSettings.php appropriately.

AdminSettings.php should set three variables:

Example

<?php
/* Database authentication credentials */
$wgDBadminuser      = 'wikiadmin';
$wgDBadminpassword  = 'adminpass';

/* Whether to enable the profileinfo.php script. */
$wgEnableProfileInfo = false;
?>

Security

AdminSettings.php contains sensitive information (account names and passwords) that can help an attacker compromise your database management system.

This is necessary to ensure that the owner for new tables is set correctly.