Free, regularly updated IP geolocation databases for developers. Get accurate city-level location data from IP addresses with no authentication required.
🌐 Website: geo.wp-statistics.com
- Free Forever - No API keys, no accounts, no rate limits
- Auto-Updated - Databases updated automatically via GitHub Actions
- Lightning Fast CDN - Served via jsDelivr with global edge locations
- Multiple Providers - Choose between MaxMind GeoLite2 or DB-IP
- City-Level Accuracy - Get country, city, coordinates, and timezone
- Version History - All versions preserved in npm registry
The industry-standard IP geolocation database.
| Property | Value |
|---|---|
| CDN URL | https://cdn.jsdelivr.net/npm/geolite2-city/GeoLite2-City.mmdb.gz |
| Update Frequency | Every Tuesday & Friday |
| Size | ~68 MB (compressed) |
| License | CC BY-SA 4.0 |
| GitHub | wp-statistics/GeoLite2-City |
| npm | geolite2-city |
A lightweight alternative with smaller file size.
| Property | Value |
|---|---|
| CDN URL | https://cdn.jsdelivr.net/npm/dbip-city-lite/dbip-city-lite.mmdb.gz |
| Update Frequency | Monthly (1st of month) |
| Size | ~19 MB (compressed) |
| License | CC BY 4.0 |
| GitHub | wp-statistics/DbIP-City-lite |
| npm | dbip-city-lite |
use GeoIp2\Database\Reader;
// Download the database from CDN
$dbUrl = 'https://cdn.jsdelivr.net/npm/geolite2-city/GeoLite2-City.mmdb.gz';
// Initialize the reader
$reader = new Reader('/path/to/GeoLite2-City.mmdb');
// Look up an IP address
$record = $reader->city('128.101.101.101');
echo $record->country->name; // 'United States'
echo $record->city->name; // 'Minneapolis'
echo $record->location->latitude; // 44.9759const { Reader } = require('@maxmind/geoip2-node');
// Download the database from CDN
const dbUrl = 'https://cdn.jsdelivr.net/npm/geolite2-city/GeoLite2-City.mmdb.gz';
// Initialize the reader
const reader = await Reader.open('./GeoLite2-City.mmdb');
// Look up an IP address
const response = reader.city('128.101.101.101');
console.log(response.country.names.en); // 'United States'
console.log(response.city.names.en); // 'Minneapolis'
console.log(response.location.latitude); // 44.9759import geoip2.database
# Download the database from CDN
db_url = 'https://cdn.jsdelivr.net/npm/geolite2-city/GeoLite2-City.mmdb.gz'
# Initialize the reader
reader = geoip2.database.Reader('./GeoLite2-City.mmdb')
# Look up an IP address
response = reader.city('128.101.101.101')
print(response.country.name) # 'United States'
print(response.city.name) # 'Minneapolis'
print(response.location.latitude) # 44.9759The easiest way to use GeoIP in WordPress - zero configuration required!
use WP_Statistics\Service\Geolocation\GeolocationFactory;
// That's it! WP Statistics handles everything:
// - Automatic database download
// - Automatic updates
// - Simple one-line API
$location = GeolocationFactory::getLocation('128.101.101.101');
echo $location['country']; // 'United States'
echo $location['country_code']; // 'US'
echo $location['city']; // 'Minneapolis'👉 Get WP Statistics: wordpress.org/plugins/wp-statistics
https://cdn.jsdelivr.net/npm/geolite2-city/GeoLite2-City.mmdb.gz
https://cdn.jsdelivr.net/npm/dbip-city-lite/dbip-city-lite.mmdb.gz
| Feature | Benefit |
|---|---|
| No Authentication | Start using immediately without API keys or accounts |
| CDN Delivery | Fast downloads from jsDelivr's global network |
| Automatic Updates | GitHub Actions fetch latest databases automatically |
| Open Source | Full transparency - check our repos for automation scripts |
| Version History | Roll back to any previous database version via npm |
| Community Trusted | Maintained by WP Statistics, trusted by 600K+ WordPress sites |
- Analytics & Reporting - Track visitor locations for website analytics
- Content Personalization - Show localized content based on user location
- Fraud Detection - Identify suspicious activity from unexpected locations
- Compliance - Implement geo-restrictions for regulatory compliance
- Marketing - Target campaigns based on geographic regions
- Load Balancing - Route users to nearest servers
Both databases provide city-level accuracy for IP geolocation:
- Country accuracy: 99%+
- City accuracy: 70-85% (varies by region)
- Coordinates: Approximate city center
For higher accuracy requirements, consider the commercial versions from MaxMind or DB-IP.
This service uses data from:
- MaxMind GeoLite2 - maxmind.com - Licensed under CC BY-SA 4.0
- DB-IP Lite - db-ip.com - Licensed under CC BY 4.0
When using these databases, please include appropriate attribution as required by the licenses.
- WP Statistics - Privacy-focused analytics for WordPress
- GeoLite2-City - MaxMind database repository
- DbIP-City-lite - DB-IP database repository
Found an issue or have a suggestion? Open an issue or submit a pull request.
This project is maintained by VeronaLabs and the WP Statistics team.
The databases are distributed under their respective licenses:
- MaxMind GeoLite2: CC BY-SA 4.0
- DB-IP Lite: CC BY 4.0
WP Statistics
Maintained with ❤️ by the WP Statistics team