From mediawiki.org
Jump to navigation Jump to search
MediaWiki extensions manual
OOjs UI icon advanced.svg
Release status: experimental
Author(s) Wikimedia Anti-harassment tools team
Latest version 0.0.0
Compatibility policy Snapshots releases along with MediaWiki. Master is not backwards compatible.
License MIT License
  • $wgIPInfoGeoIP2Path
  • ipinfo
Translate the IPInfo extension if it is available at translatewiki.net

Check usage and version matrix.

Issues Open tasks · Report a bug

The IP Info extension is a forthcoming feature for displaying IP information to help trusted users in their anti-vandalism workflows. The IP info feature is being built by the Anti-harassment tools team as part of the IP masking project.


The IP info feature displays information about an IP address that would otherwise only be available from external tools.

Information buttons are added next to IP addresses on history pages and on the Special:Log page. Clicking on these buttons displays a popup with the information.

The same information is also added to the top of the Special:Contributions page for an IP address.


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

Granting rights to use the IP info feature[edit]

The IP info feature is available to users who have the ipinfo right. To grant this right to all administrators on your wiki, add the following to LocalSettings.php:

$wgGroupPermissions['sysop']['ipinfo'] = true;

Once a user has this right, they will also need to enable the feature via Special:Preferences by checking the checkbox in the IP information section of the User profile tab.


The IPInfo extension currently supports displaying data from MaxMind's GeoIP2 databases. The databases must be added to your server, and the $wgIPInfoGeoIP2Path configuration variable must be set to the patch for these files, including the common prefix of the filenames (see the test data example).

Free test data[edit]

For development environments, free test data is available from https://dev.maxmind.com/geoip/geoip2/geolite2/. Download these databases, and move all the .mmdb files into the same directory. Then set the $wgIPInfoGeoIP2Path variable to the path to the directory containing the .mmdb files, plus the prefix GeoLite2-. Do this by adding the following to LocalSettings.php:

$wgIPInfoGeoIP2Path = '$pathToDir/GeoLite2-';

replacing $pathToDir with the path to the directory containing the .mmdb files.


Setting name Default value Description
$wgIPInfoGeoIP2Path false Path to the directory containing GeoIP2 database files