Plugin Directory

Test out the new Plugin Directory and let us know what you think.

IP2Location Variables

Library enables you to easily integrate geolocation solution into your blog site. It supports both IPv4 and IPv6 address.

This library enables you to easily integrate geolocation solution into your blog site, plugin or template. In a nutshell, it’s a library derived from https://www.ip2location.com/developers/php but works as a WordPress plugin to simplify the setup for the usage. It supports both the IPv4 and IPv6 address. Below are the information you can retrieve from this library:

  • Country code
  • Country name
  • Country flag
  • Region name
  • City name
  • Latitude and longitude
  • ZIP code
  • ISP
  • Domain name
  • Time zone
  • Net speed
  • IDD code
  • Area code
  • Weather station code & name
  • MNC, MCC, mobile carrier name
  • Elevation
  • Usage type

This plugin supports both IP2Location BIN data and web service for geolocation queries. If you are using the BIN data, you can update the BIN data every month by using the wizard on the settings page for the accurate result. Alternatively, you can also manually download and update the BIN data file using the below links:

BIN file download: IP2Location Commercial database | IP2Location LITE database (free edition)

If you are using the web service, please visit IP2Location Web Service for details.


Call the function ip2location_get_vars() in any pages, plugins, or themes to retrieve IP2Location variables. The variables are returned in object.

More Information

Please visit us at http://www.ip2location.com

Requires: 2.0 or higher
Compatible up to: 4.7.2
Last Updated: 7 days ago
Active Installs: 100+


3.7 out of 5 stars


Got something to say? Need help?


Not enough data

0 people say it works.
0 people say it's broken.