WordPress Plugin by Monday Digital

Self-hosted IP geolocation for WordPress.

No API fees. No rate limits. No visitor data leaving your server.
GeoIP2 Self-Contained downloads the geolocation database to your own hosting and runs lookups locally.

Free Forever No License Key Needed for DB-IP Self-Hosted Database GPL-2.0+ WordPress 5.8+
WordPress 5.8+
PHP 7.4+
Extensions zlib, phar
Hosting fit Single-site
Lookup model
Local database
Database sources
DB-IP + MaxMind
Integration options
Shortcode, PHP, forms

Quick Start

Get geolocation running in minutes

The default DB-IP setup is intentionally lightweight: install the plugin, trigger the first database download, confirm the local files are ready, and start using the shortcode or PHP function.

  1. Install and activate the plugin in WordPress.
  2. Click Download Now in the first-run admin notice.
  3. The plugin downloads geoip2.phar and the selected geolocation database.
  4. Files are stored in wp-content/uploads/geoip/ with web-access protection.
  5. Confirm both resources show as ready in the Status panel.

Overview

Why this plugin exists

Most geolocation plugins call a remote API on every page load. That adds latency, creates a new third-party dependency, and sends visitor IP data off-server. GeoIP2 Self-Contained flips that model.

It downloads the database to your own WordPress host once, performs each lookup locally, and keeps the data fresh with scheduled updates. The default DB-IP setup works without an account, while MaxMind GeoLite2 is available for teams that want an alternate free source.

Use it anywhere in your WordPress stack

  • Insert [geo_visitor_info] into pages or hidden form fields
  • Call geoip2_get_visitor_geo_data() in custom themes and plugins
  • Capture location data inside Gravity Forms, WPForms, CF7, Elementor Forms, or custom HTML forms

Core Features

Why teams choose this for production WordPress sites

Self-hosted database

All lookups run locally on your server with no outbound API request on page load.

No account needed

DB-IP City Lite works out of the box without sign-up, API key, or credit card.

Auto-updates

Refresh schedules are configurable from 1 to 30 days so geo data stays current.

Privacy-first

Visitor IP addresses are not transmitted to external services during lookups.

Developer-friendly

Use a shortcode for content teams or a PHP function for theme and plugin developers.

Form builder ready

Drop location data into hidden fields for Gravity Forms, WPForms, CF7, Elementor, or custom forms.

Cloudflare compatible

Reads the real visitor IP from CF-Connecting-IP when Cloudflare is in front of the site.

Two database sources

Choose DB-IP City Lite or MaxMind GeoLite2 depending on your workflow and data preference.

Secure storage

Downloaded files are protected with .htaccess and index.php guards.

Update log

Every download attempt is written to a local log with rotation at 5 MB.

Use Cases

When this plugin makes sense

Location-aware lead routing

Capture country, city, or region inside forms so sales or support teams can triage submissions faster.

Privacy-first personalization

Show geography-aware content without sending visitor IP data to third-party APIs on every request.

Agency deployments

Roll out a consistent setup across client sites where predictable hosting behavior matters more than flashy extras.

Custom WordPress builds

Use local geodata in templates, plugins, and integrations through a shortcode or direct PHP access.

Returned Data

What each lookup can provide

Country name, ISO code, GeoName ID City name and GeoName ID Postal code Latitude and longitude Accuracy radius Timezone Continent name and code Subdivisions, regions, states Registered country Traits like anonymous proxy, anycast, and satellite provider flags

Technical Specifications

Deployment-ready at a glance

Current version 1.0.0
Requires WordPress 5.8 or higher
Tested up to 6.8
Requires PHP 7.4 or higher
Required PHP extensions zlib, phar
License GPL-2.0+
Database sources DB-IP City Lite, MaxMind GeoLite2 City
Default source DB-IP, no account needed
Storage location wp-content/uploads/geoip/
Cron schedule Configurable from 1 to 30 days
Shortcode [geo_visitor_info]
PHP function geoip2_get_visitor_geo_data()
Multisite Single-site activation only
Author Monday Digital

Pricing & Licensing

Free and open source from day one

GeoIP2 Self-Contained is completely free under the GPL-2.0+ license. No premium tier, no feature locks, and no upsells. Download it, use it, and modify it.

Product Screens

A visual tour of the plugin workflow

GeoIP2 Self-Contained settings page overview
01

Settings page overview

Configuration, status, manual actions, and update log in one full admin view.

GeoIP2 Self-Contained first-run admin notice
02

First-run admin notice

The activation prompt that requests the initial database and library download.

GeoIP2 Self-Contained status panel
03

Status panel

Ready and installed badges for the database file and GeoIP2 reader library.

GeoIP2 Self-Contained visitor log table
04

Visitor log

Paginated admin log view for recorded visitor lookups when logging is enabled.

GeoIP2 Self-Contained shortcode output example
05

Shortcode output

Frontend rendering of [geo_visitor_info] on a content page.

GeoIP2 Self-Contained form builder integration example
06

Form builder example

Hidden field usage inside a form builder workflow for location-aware submissions.

Changelog

Initial release highlights

v1.0.0 Initial release
  • Self-hosted DB-IP City Lite database (no account needed)
  • Optional MaxMind GeoLite2 support with free license key
  • Automatic downloads and scheduled database refresh (configurable 1–30 days)
  • [geo_visitor_info] shortcode with 1-hour per-IP transient cache
  • geoip2_get_visitor_geo_data() PHP function for developers
  • Visitor location logging with hourly rate limiting (disabled by default)
  • Cloudflare-compatible real IP detection (CF-Connecting-IP)
  • Source tracking — warns if installed MMDB source does not match selected source
  • Log rotation at 5 MB with dated backup files
  • .htaccess and index.php protection for all uploaded files
  • Paginated visitor log viewer in the admin panel
  • GDPR privacy policy content block registered with the WordPress Privacy tool
  • Source mismatch detection and admin warning with one-click update action

Documentation Snapshot

First-run flow for site owners

  1. Install and activate the plugin in WordPress.
  2. Click Download Now in the first-run admin notice.
  3. The plugin downloads geoip2.phar and the selected geolocation database.
  4. Files are stored in wp-content/uploads/geoip/ with web-access protection.
  5. Confirm both resources show as ready in the Status panel.

Operational notes

  • Optional visitor logging is disabled by default for privacy.
  • WordPress Cron handles scheduled database refreshes.
  • For low-traffic sites, a real server cron can improve update reliability.
  • Switching database sources queues a fresh background download automatically.

Support & Updates

Clear expectations for maintenance and help

  • Updates are delivered through the standard WordPress plugin update flow when new versions are published.
  • Setup guidance is available on this page and through the WordPress.org plugin listing.
  • Monday Digital can help with implementation questions, deployment support, and practical usage guidance.
  • The release approach stays focused on production-ready value, privacy, and maintainability instead of upsell-driven complexity.

Quick trust cues

No premium upsells Local IP lookups WordPress update flow Production-ready defaults

FAQ

Common questions from plugin users

No for the default setup. DB-IP City Lite works without any account or license key. Just install, click Download Now in the admin notice, and you're ready. MaxMind GeoLite2 is optional and requires a free MaxMind license key.

No. Lookups run locally against a file on your server — typically under 1 millisecond. There is no outbound HTTP request on any page load. The shortcode output is also cached per-visitor IP for one hour.

In your WordPress uploads folder, at wp-content/uploads/geoip/GeoLite2-City.mmdb. The GeoIP2 PHP reader library (geoip2.phar) is stored in the same folder. Both are protected from direct web access.

Automatically, on the schedule you set (default: every 7 days). DB-IP updates their free database monthly. MaxMind releases GeoLite2 updates on the first Tuesday of each month.

Yes. The plugin automatically reads the real visitor IP from the CF-Connecting-IP header when Cloudflare is in use.

Yes. Place the [geo_visitor_info] shortcode in a hidden field in Gravity Forms, WPForms, Contact Form 7, Elementor Forms, or a plain HTML form. The visitor's location data is included in the form submission.

No. All lookups are performed locally using the self-hosted database. The only external connections are the scheduled database download from DB-IP or MaxMind, and the one-time download of geoip2.phar from GitHub. No visitor IP addresses are ever transmitted externally.

Visitor logging is disabled by default. If you enable it, you must update your site's privacy policy to disclose the data collection. The plugin provides suggested privacy policy content in the WordPress Privacy tool under Settings > Privacy.

The plugin supports single-site activation. It can be activated per-site on a multisite network but does not support network-wide (network activation) use.

Related Links

Explore more in the Lab catalog

Browse all Lab plugins

See the wider plugin directory and compare release posture, update style, and deployment fit.

Back to top