Plugin converts IP-address to the country.
As of April 2026, Ip2country is a WordPress ip plugin with 10 active installations and a 0/5 rating0. It has been downloaded 4.3K+ times in total. Requires WordPress 3.0+ and PHP false+. Available on WordPress.org since 2011. Last updated 5 years ago — may have compatibility concerns. Top alternative: Server IP & Memory Usage Display.
Code is based on: phpweby.com/software/ip2country
Get country code or country name:
<?php
$ip2country = ip2country();
echo ' Country code: '.$ip2country->country_code;
echo ' Country name: '.$ip2country->country_name;
// or
$ip2country2 = ip2country('212.113.46.148');
echo ' Country code: '.$ip2country2->country_code;
echo ' Country name: '.$ip2country2->country_name;
?>
Get additional info about the country by country code:
<?php
$ip2country_info = ip2country_info($ip2country->country_code);
echo ' iso_code_2: '.$ip2country_…| WordPress | 3.0+ requiredTested up to 5.4.19 |
| PHP | false+ required |
Plugin data sourced from WordPress.org. Analysis and metrics by PluginSift.