From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png

Release status:Extension status beta

GlobalPreferences global selection checkboxes.png
ImplementationTemplate:Extension#type Special page
DescriptionTemplate:Extension#description Allows a user to set global (wikifarm-wide) user preferences
Author(s)Template:Extension#username Kunal Mehta (Legoktmtalk)
MediaWikiTemplate:Extension#mediawiki 1.25+
Database changesTemplate:Extension#needs-updatephp Yes
LicenseTemplate:Extension#license GNU General Public License 2.0 or later
Hooks usedTemplate:Extension#hook

Translate the GlobalPreferences extension if it is available at translatewiki.net

Check usage and version matrix.


Open tasks · Report a bug

The GlobalPreferences extension allows a user to set some or all of their preferences to be used globally on all wikis in a Wiki family. For example, you can set your skin to be the same on all wikis, but have different watchlist settings on different wikis. It is also possible for global preferences to be given local exceptions on particular wikis.

Although it is possible to have global user preferences without any extension by setting up a shared database with a shared user_properties table, the GlobalPreferences extension is useful for more varied use cases such as:

  • A user wants to set the same language on all wikis, but wants to keep one wiki on its default.
  • One wiki has a preference hidden with $wgHiddenPrefs, and another doesn't.
  • A user wants to set a different skin on each wiki.
  • Two wikis have two different gadgets named the same.
  • A wiki has an extension installed which sets a preference, but that extension is not enabled on another wiki in the farm.


Before GlobalPreferences can work, you need to set up central user IDs. This can be done with the CentralAuth extension (or other CentralIdLookup provider) but for most wiki families can more easily be done with shared database tables. (This will mean that users' email addresses, passwords, and real names[1] will be set across all wikis, and won't be able to be set on a per-wiki basis.)

If using the shared tables approach, set the following in LocalSettings.php:

$wgSharedDB = '<shared_wiki_database>';
$wgSharedTables = [ 'user' ]; // Note that 'user_properties' is not included.

Then GlobalPreferences can be installed in the usual manner:

  • Download and place the file(s) in a directory called GlobalPreferences in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'GlobalPreferences' );
    // No need to set this if it's the same as $wgSharedDB.
    $wgGlobalPreferencesDB = '<global_preferences_database>';
  • Run the update script which will automatically create the necessary database tables that this extension needs.
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.


Name of the database to store global preferences in. If no value is given, $wgSharedDB will be used, and if that is empty $wgDBname will be used.
This database does not have to be one that used for anything else, but often is set to the same as wherever central user data is stored.

See also[edit]


  1. The 'real name' preference is a confusing one because it's handled separately to all other preferences that can be modified from Special:Preferences. See Phabricator:T72670.