跳到内容

MDL Local Geo Lookup

v1.0.1

Monday Digital Lab · 2026年6月1日 上架

Detect visitor location from a self-hosted IP geolocation database — no external API calls, no per-request latency, no usage limits.

正在使用
40+
评分
暂无
累计下载
743
最近更新
2026年11月24日
需要 WordPress 5.9+已测试到 7.1.5PHP 7.4+

截图

Settings page — database source, license key, update interval, source alignment status, and visitor logging toggle.
Settings page — database source, license key, update interval, source alignment status, and visitor logging toggle.
Visitor log — paginated view of logged visitor locations.
Visitor log — paginated view of logged visitor locations.
Shortcode output — [mdlgeo_visitor_info] displaying detected location data.
Shortcode output — [mdlgeo_visitor_info] displaying detected location data.

MDL Local Geo Lookup is a lightweight WordPress geolocation plugin that detects visitor location using a local IP geolocation database — no external API calls, no per-request latency, no usage limits.

The plugin automatically downloads and maintains an IP-to-city database on your own server. Every GeoIP lookup runs locally, keeping your site fast and your visitor data private.

No sign-up required. The default DB-IP City Lite source works out of the box — no account, no license key, no configuration. Activate, click one button, done.

Prefer MaxMind?
Switch to GeoLite2 City in Settings by entering a free MaxMind license key.

Why Local Geolocation?

Most IP geolocation plugins call an external API on every page load. That adds latency, creates a single point of failure, and sends your visitor IPs to a third party. MDL Local Geo Lookup keeps everything on your server:

  • Faster — database lookups in milliseconds, no HTTP round-trip.
  • More private — visitor IPs never leave your server.
  • More reliable — no API rate limits, no downtime from third-party services.
  • Unlimited lookups — no monthly quota, no paid API tiers.

Features:

  • Two database sources — DB-IP City Lite (default, no account needed) or MaxMind GeoLite2 City (free license key required).
  • One-click setup — download the geolocation database directly from your admin panel after activation.
  • Automatic updates — scheduled database refresh keeps IP data current (configurable: 1–30 days).
  • Shortcode — [mdlgeo_visitor_info] displays visitor country, city, region, postal code, timezone, and coordinates on any page or post.
  • PHP function — mdlgeo_get_visitor_geo_data() returns full location data for use in themes, plugins, or custom logic.
  • Visitor location log — optional paginated log of visitor IP addresses and detected locations in the admin panel.
  • Form builder compatible — embed the shortcode in a hidden field in Elementor Forms, Contact Form 7, WPForms, Gravity Forms, or any HTML form to capture visitor location with submissions.
  • Cloudflare compatible — automatically reads the real visitor IP from CF-Connecting-IP when Cloudflare is active.
  • Source alignment tracking — detects when the installed MMDB file does not match the selected database source and prompts you to update it.
  • GeoIP2 PHP reader bundled — no Composer, no external library downloads.
  • Secure logging — log directory protected with .htaccess and index.php to block direct web access.

Use Cases:

  • Display visitor city and country on any page
  • Pre-fill location fields in contact or lead-capture forms
  • Personalize content based on visitor country or region
  • Log visitor locations for analytics or compliance
  • Feed location data into custom plugins or theme logic

Requirements:

  • WordPress 5.9 or higher
  • PHP 7.4 or higher
  • PHP extensions: zlib, phar
  • MaxMind license key only required if you select the MaxMind GeoLite2 source

External Services

This plugin connects to third-party services to download geolocation databases, and can send one optional email when an administrator deactivates it (see Deactivation feedback below). No visitor data is transmitted to any of these services.

DB-IP (default)

  • What: Downloads the free DB-IP City Lite database (.mmdb format), licensed under CC BY 4.0.
  • When: On first-run setup (triggered by the admin) and on the configured auto-update schedule.
  • URL: https://download.db-ip.com/free/dbip-city-lite-{year}-{month}.mmdb.gz
  • Website: https://db-ip.com
  • Terms of Use: https://db-ip.com/db/lite.php
  • Privacy Policy: https://db-ip.com/privacy.php

MaxMind GeoLite2 (optional)

When using the MaxMind source, this plugin uses the GeoLite2 database created by MaxMind, available from https://www.maxmind.com.

Deactivation feedback (optional)

When you deactivate the plugin from the Plugins screen, a short popup asks why. Answering is optional: “Skip & Deactivate” is always available, nothing is sent unless you click “Submit & Deactivate”, and the plugin deactivates either way.

  • What is sent: the reason you pick, the comment you type (if any), the plugin version, the WordPress version and your site language. Your email address is included only if you tick “You may contact me about this” and enter it. No site URL, IP address or user name is included in the message. No visitor data is ever included.
  • How it is sent: as an email from your own site (using WordPress’s wp_mail()) to lab@mondaydigital.com. Like any email from your site, the sender address in the email headers shows your site’s domain.
  • Switch it off: add_filter( 'mdlgeo_feedback_enabled', '__return_false' );
  • Privacy Policy: https://mondaydigital.com/privacy-policy/

Privacy Policy

Visitor location logging is disabled by default and must be explicitly enabled by the site admin in Settings.

When enabled, each frontend page load by a non-logged-in visitor appends one line to a local log file containing the serial number, timestamp, IP address, country, city, postal code, timezone, and coordinates. All data is stored on your server. No visitor data is transmitted to external services. The only outgoing message is the optional deactivation feedback email described under External Services, which is sent only when an administrator chooses to submit it.

Because log entries are associated only with IP addresses — not persistent identifiers such as email addresses — the plugin does not register with WordPress personal data export or erasure tools. You are responsible for disclosing this data collection in your site’s privacy policy in accordance with applicable law (e.g., GDPR, CCPA).

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums