Manual:AdminSettings.php: Difference between revisions
No edit summary |
m Undo revision 934930 by 77.104.127.88 (talk) |
||
| Line 6: | Line 6: | ||
===Upgrading=== |
===Upgrading=== |
||
If upgrading from a pre-1.16 version of MediaWiki to version 1.16 or later, the variables set in <code>AdminSettings.php</code> file can be safely removed. <code>AdminSettings.php</code> is no longer needed. If it still exists, it will be loaded by [[Manual:Maintenance scripts|maintenance scripts]] to retain backward compatibility. |
If upgrading from a pre-1.16 version of MediaWiki to version 1.16 or later, the variables set in <code>AdminSettings.php</code> file can be safely removed. <code>AdminSettings.php</code> is no longer needed. If it still exists, it will be loaded by [[Manual:Maintenance scripts|maintenance scripts]] to retain backward compatibility. |
||
==Prior to 1.16== |
|||
Manually create <code>AdminSettings.php</code> in the root directory the MediaWiki installation. Typically, this is done by renaming <code>AdminSettings.sample</code> to <code>AdminSettings.php</code> and then editing <code>AdminSettings.php</code> appropriately. |
|||
<code>AdminSettings.php</code> should set three variables: |
|||
* <code>[[Manual:$wgDBadminuser|$wgDBadminuser]]</code> - the name of a database account that has sufficient privileges to run the database [[Manual:Maintenance scripts|maintenance scripts]]. For MySQL databases, this account should have "superuser" privileges. For PostgreSQL databases, this account should be the same account used for [[Manual:$wgDBuser|$wgDBuser]]. |
|||
* <code>[[Manual:$wgDBadminpassword|$wgDBadminpassword]]</code> - the password for the <code>wgDBadminuser</code> account. |
|||
* <code>[[Manual:$wgEnableProfileInfo|$wgEnableProfileInfo]]</code> - controls the availability of <code>[[Manual:Profileinfo.php|profileinfo.php]]</code>. |
|||
===Example=== |
|||
<source lang="php"> |
|||
<?php |
|||
/* Database authentication credentials */ |
|||
$wgDBadminuser = 'wikiadmin'; |
|||
$wgDBadminpassword = 'adminpass'; |
|||
/* Whether to enable the profileinfo.php script. */ |
|||
$wgEnableProfileInfo = false; |
|||
</source> |
|||
===Security=== |
|||
[[Manual:AdminSettings.php|AdminSettings.php]] contains sensitive information (account names and passwords) that can help an attacker compromise your database management system. Ensure that you've taken the relevant preventative measures listed in [[Manual:Security]] and [[Manual:Securing database passwords]]. |
|||
===PostgreSQL-specific issues=== |
|||
If using PostgreSQL with your MediaWiki installation, the authentication credentials used for <code>[[Manual:$wgDBadminuser|$wgDBadminuser]]</code> and <code>[[Manual:$wgDBadminpassword|$wgDBadminpassword]]</code> should be the same as the credentials used for <code>[[Manual:$wgDBuser|$wgDBuser]]</code> and <code>[[Manual:$wgDBpassword|$wgDBpassword]]</code>. This is necessary to ensure that the owner for new tables is set correctly. |
|||
{{languages}} |
|||
Revision as of 01:26, 22 March 2014
| MediaWiki file: AdminSettings.php | |
|---|---|
| Location: | / |
| Source code: | not in Git (created by user) |
| Classes: | |
Overview
The requirement for AdminSettings.php (along with supporting file AdminSettings.sample) was 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.
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. AdminSettings.php is no longer needed. If it still exists, it will be loaded by maintenance scripts to retain backward compatibility.
Prior to 1.16
Manually create AdminSettings.php in the root directory 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:
$wgDBadminuser- the name of a database account that has sufficient privileges to run the database maintenance scripts. For MySQL databases, this account should have "superuser" privileges. For PostgreSQL databases, this account should be the same account used for $wgDBuser.$wgDBadminpassword- the password for thewgDBadminuseraccount.$wgEnableProfileInfo- controls the availability ofprofileinfo.php.
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. Ensure that you've taken the relevant preventative measures listed in Manual:Security and Manual:Securing database passwords.
PostgreSQL-specific issues
If using PostgreSQL with your MediaWiki installation, the authentication credentials used for $wgDBadminuser and $wgDBadminpassword should be the same as the credentials used for $wgDBuser and $wgDBpassword. This is necessary to ensure that the owner for new tables is set correctly.