From mediawiki.org
MediaWiki extensions manual
OOjs UI icon advanced-invert.svg
Release status: unmaintained
Implementation Parser extension
Description Displays a user's real name everywhere
Author(s) ofbeatontalk
Latest version 0.8.0 (2021-06-27)
MediaWiki 1.31+
PHP 7.0+
Database changes No
Composer ofbeaton/mediawiki-realnames
License BSD 2-clause "Simplified" License
Release notes

  • $wgRealnamesLinkStyle
  • $wgRealnamesBareStyle
  • $wgRealnamesBlank
  • $wgRealnamesStyles
  • $wgRealnamesReplacements
  • $wgRealnamesSmart
  • $wgRealnamesNamespaces

Check usage and version matrix.

This Realnames extension attempts to add realname to all username links.

Modifies a page's html content right before display to keep the approach generic and simple. This means it works for most links and does not need special consideration with new hooks. Compatibility with other extensions should be very strong.

This means it works on:

While the focus is on realname display, it can customized to change the display of username links to anything desired (add an image? another class?). This can be incredibly powerful.

It was developed mainly for Enterprise/Corporate users of MediaWiki where realnames are much more important, and often make much more sense than the usual algorithmically chosen usernames.

The default configuration prioritises realnames first with the username in parenthesis. Since usernames are still needed for wiki links, wiki actions,  and realnames can sometimes collide; displaying both is recommended. This is optional, see the configuration options bellow.

There is currently no way to preserve User: prefixes on links or text.


  • Download and place the file(s) in a directory called Realnames in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'Realnames' );
  • Configure as required.
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

To users running MediaWiki 1.25 or earlier:

The instructions above describe the new way of installing this extension using wfLoadExtension(). If you need to install this extension on these earlier versions (MediaWiki 1.25 and earlier), instead of wfLoadExtension( 'Realnames' );, you need to use:

require_once "$IP/extensions/Realnames/Realnames.php";


See AdvancedConfiguration for finer control, including custom styles.

Parameter Values Example Description
$wgRealnamesLinkStyle "standard" mw305 Provided for convenience, this is the default MediaWiki behavior
"append" mw305 [Martha Stewart]
"replace" Martha Stewart
"reverse" Martha Stewart [mw305]
"dash" mw305 – Martha Stewart
"dash-reverse" Martha Stewart – mw305
"paren-append" mw305 (Martha Stewart)
"paren-reverse" Martha Stewart (mw305) Default


The extension was considered in a usable state and feature complete at the time it became unmaintained. Because of the way it hooks into a core MediaWiki hook, it has been very resilient and it may continue to work without issue for years to come without modification.

This extension is primarily used in corporate applications. However the author no longer uses it, nor has a way to test any changes, so updates are unlikely.

As of 2021 PRs are still being merged on github, however the author has no way to test them for correctness and is looking for someone to take over the extension.

See also[edit]