{"id":306589,"date":"2026-06-01T06:53:49","date_gmt":"2026-06-01T06:53:49","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/geoip2-self-contained\/"},"modified":"2026-06-06T07:13:11","modified_gmt":"2026-06-06T07:13:11","slug":"mdl-local-geo-lookup","status":"publish","type":"plugin","link":"https:\/\/hr.wordpress.org\/plugins\/mdl-local-geo-lookup\/","author":23485821,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.0","stable_tag":"1.0.0","tested":"7.0","requires":"5.8","requires_php":"7.4","requires_plugins":null,"header_name":"MDL Local Geo Lookup","header_author":"Monday Digital Lab","header_description":"Self-hosts an IP geolocation database and PHP reader library. Auto-downloads and updates on a schedule. Provides [mdlgeo_visitor_info] shortcode and geo lookup PHP function.","assets_banners_color":"2d3f5e","last_updated":"2026-06-06 07:13:11","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/lab.mondaydigital.com\/plugins\/mdl-local-geo-lookup\/","header_author_uri":"https:\/\/lab.mondaydigital.com","rating":0,"author_block_rating":0,"active_installs":0,"downloads":128,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"mondaydigitallab","date":"2026-06-06 07:13:11"}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3556325,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3556325,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256},"icon.svg":{"filename":"icon.svg","revision":3563673,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3563673,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3556325,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250},"banner.svg":{"filename":"banner.svg","revision":3556325,"resolution":false,"location":"assets","locale":false}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3556325,"resolution":"1","location":"assets","locale":"","width":1774,"height":899},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3556325,"resolution":"2","location":"assets","locale":"","width":1720,"height":186},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3556325,"resolution":"3","location":"assets","locale":"","width":542,"height":217}},"screenshots":{"1":"Settings page \u2014 database source, license key, update interval, source alignment status, and visitor logging toggle.","2":"Visitor log \u2014 paginated view of logged visitor locations.","3":"Shortcode output \u2014 [mdlgeo_visitor_info] displaying detected location data."}},"plugin_section":[],"plugin_tags":[2493,4124,3919,4130,265281],"plugin_category":[49],"plugin_contributors":[265282],"plugin_business_model":[],"class_list":["post-306589","plugin","type-plugin","status-publish","hentry","plugin_tags-geoip","plugin_tags-geolocation","plugin_tags-ip-address","plugin_tags-maxmind","plugin_tags-visitor-location","plugin_category-maps-and-location","plugin_contributors-mondaydigitallab","plugin_committers-mondaydigitallab"],"banners":{"banner":"https:\/\/ps.w.org\/mdl-local-geo-lookup\/assets\/banner-772x250.png?rev=3556325","banner_2x":"https:\/\/ps.w.org\/mdl-local-geo-lookup\/assets\/banner-1544x500.png?rev=3563673","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/mdl-local-geo-lookup\/assets\/icon.svg?rev=3563673","icon":"https:\/\/ps.w.org\/mdl-local-geo-lookup\/assets\/icon.svg?rev=3563673","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/mdl-local-geo-lookup\/assets\/screenshot-1.png?rev=3556325","caption":"Settings page \u2014 database source, license key, update interval, source alignment status, and visitor logging toggle."},{"src":"https:\/\/ps.w.org\/mdl-local-geo-lookup\/assets\/screenshot-2.png?rev=3556325","caption":"Visitor log \u2014 paginated view of logged visitor locations."},{"src":"https:\/\/ps.w.org\/mdl-local-geo-lookup\/assets\/screenshot-3.png?rev=3556325","caption":"Shortcode output \u2014 [mdlgeo_visitor_info] displaying detected location data."}],"raw_content":"<!--section=description-->\n<p>MDL Local Geo Lookup is a lightweight WordPress geolocation plugin that detects visitor location using a local IP geolocation database \u2014 no external API calls, no per-request latency, no usage limits.<\/p>\n\n<p>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.<\/p>\n\n<p>No sign-up required. The default DB-IP City Lite source works out of the box \u2014 no account, no license key, no configuration. Activate, click one button, done.<\/p>\n\n<p><strong>Prefer MaxMind?<\/strong>\nSwitch to GeoLite2 City in Settings by entering a free MaxMind license key.<\/p>\n\n<p><strong>Why Local Geolocation?<\/strong><\/p>\n\n<p>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:<\/p>\n\n<ul>\n<li><strong>Faster<\/strong> \u2014 database lookups in milliseconds, no HTTP round-trip.<\/li>\n<li><strong>More private<\/strong> \u2014 visitor IPs never leave your server.<\/li>\n<li><strong>More reliable<\/strong> \u2014 no API rate limits, no downtime from third-party services.<\/li>\n<li><strong>Unlimited lookups<\/strong> \u2014 no monthly quota, no paid API tiers.<\/li>\n<\/ul>\n\n<p><strong>Features:<\/strong><\/p>\n\n<ul>\n<li><strong>Two database sources<\/strong> \u2014 DB-IP City Lite (default, no account needed) or MaxMind GeoLite2 City (free license key required).<\/li>\n<li><strong>One-click setup<\/strong> \u2014 download the geolocation database directly from your admin panel after activation.<\/li>\n<li><strong>Automatic updates<\/strong> \u2014 scheduled database refresh keeps IP data current (configurable: 1\u201330 days).<\/li>\n<li><strong>Shortcode<\/strong> \u2014 <code>[mdlgeo_visitor_info]<\/code> displays visitor country, city, region, postal code, timezone, and coordinates on any page or post.<\/li>\n<li><strong>PHP function<\/strong> \u2014 <code>mdlgeo_get_visitor_geo_data()<\/code> returns full location data for use in themes, plugins, or custom logic.<\/li>\n<li><strong>Visitor location log<\/strong> \u2014 optional paginated log of visitor IP addresses and detected locations in the admin panel.<\/li>\n<li><strong>Form builder compatible<\/strong> \u2014 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.<\/li>\n<li><strong>Cloudflare compatible<\/strong> \u2014 automatically reads the real visitor IP from <code>CF-Connecting-IP<\/code> when Cloudflare is active.<\/li>\n<li><strong>Source alignment tracking<\/strong> \u2014 detects when the installed MMDB file does not match the selected database source and prompts you to update it.<\/li>\n<li><strong>GeoIP2 PHP reader bundled<\/strong> \u2014 no Composer, no external library downloads.<\/li>\n<li><strong>Secure logging<\/strong> \u2014 log directory protected with <code>.htaccess<\/code> and <code>index.php<\/code> to block direct web access.<\/li>\n<\/ul>\n\n<p><strong>Use Cases:<\/strong><\/p>\n\n<ul>\n<li>Display visitor city and country on any page<\/li>\n<li>Pre-fill location fields in contact or lead-capture forms<\/li>\n<li>Personalize content based on visitor country or region<\/li>\n<li>Log visitor locations for analytics or compliance<\/li>\n<li>Feed location data into custom plugins or theme logic<\/li>\n<\/ul>\n\n<p><strong>Requirements:<\/strong><\/p>\n\n<ul>\n<li>WordPress 5.8 or higher<\/li>\n<li>PHP 7.4 or higher<\/li>\n<li>PHP extensions: <code>zlib<\/code>, <code>phar<\/code><\/li>\n<li>MaxMind license key only required if you select the MaxMind GeoLite2 source<\/li>\n<\/ul>\n\n<h3>External Services<\/h3>\n\n<p>This plugin connects to third-party services only to download geolocation databases. No visitor data is transmitted to these services.<\/p>\n\n<h4>DB-IP (default)<\/h4>\n\n<ul>\n<li><strong>What:<\/strong> Downloads the free DB-IP City Lite database (<code>.mmdb<\/code> format), licensed under CC BY 4.0.<\/li>\n<li><strong>When:<\/strong> On first-run setup (triggered by the admin) and on the configured auto-update schedule.<\/li>\n<li><strong>URL:<\/strong> <code>https:\/\/download.db-ip.com\/free\/dbip-city-lite-{year}-{month}.mmdb.gz<\/code><\/li>\n<li><strong>Website:<\/strong> <a href=\"https:\/\/db-ip.com\">https:\/\/db-ip.com<\/a><\/li>\n<li><strong>Terms of Use:<\/strong> <a href=\"https:\/\/db-ip.com\/db\/lite.php\">https:\/\/db-ip.com\/db\/lite.php<\/a><\/li>\n<li><strong>Privacy Policy:<\/strong> <a href=\"https:\/\/db-ip.com\/privacy.php\">https:\/\/db-ip.com\/privacy.php<\/a><\/li>\n<\/ul>\n\n<h4>MaxMind GeoLite2 (optional)<\/h4>\n\n<ul>\n<li><strong>What:<\/strong> Downloads the MaxMind GeoLite2 City database (<code>.mmdb<\/code> format). Only used when the admin selects MaxMind as the database source and provides a license key.<\/li>\n<li><strong>When:<\/strong> On source change or license key update, and on the configured auto-update schedule.<\/li>\n<li><strong>URL:<\/strong> <code>https:\/\/download.maxmind.com\/app\/geoip_download?...<\/code><\/li>\n<li><strong>Website:<\/strong> <a href=\"https:\/\/www.maxmind.com\">https:\/\/www.maxmind.com<\/a><\/li>\n<li><strong>Terms of Use:<\/strong> <a href=\"https:\/\/www.maxmind.com\/en\/geolite2\/eula\">https:\/\/www.maxmind.com\/en\/geolite2\/eula<\/a><\/li>\n<li><strong>Privacy Policy:<\/strong> <a href=\"https:\/\/www.maxmind.com\/en\/privacy-policy\">https:\/\/www.maxmind.com\/en\/privacy-policy<\/a><\/li>\n<\/ul>\n\n<p>When using the MaxMind source, this plugin uses the GeoLite2 database created by MaxMind, available from <a href=\"https:\/\/www.maxmind.com\">https:\/\/www.maxmind.com<\/a>.<\/p>\n\n<h3>Privacy Policy<\/h3>\n\n<p>Visitor location logging is disabled by default and must be explicitly enabled by the site admin in Settings.<\/p>\n\n<p>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 data is transmitted to external services.<\/p>\n\n<p>Because log entries are associated only with IP addresses \u2014 not persistent identifiers such as email addresses \u2014 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).<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>mdl-local-geo-lookup<\/code> folder to <code>\/wp-content\/plugins\/<\/code>, or install directly from <strong>Plugins &gt; Add New<\/strong>.<\/li>\n<li>Activate the plugin via <strong>Plugins &gt; Installed Plugins<\/strong>.<\/li>\n<li>Click <strong>Download Now<\/strong> in the admin notice to fetch the DB-IP geolocation database.<\/li>\n<li>(Optional) Go to <strong>Settings &gt; MDL Local Geo Lookup<\/strong> to switch to MaxMind GeoLite2, adjust the update interval, or enable visitor logging.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"can%20i%20use%20this%20without%20creating%20any%20account%3F\"><h3>Can I use this without creating any account?<\/h3><\/dt>\n<dd><p>Yes. The plugin uses the free DB-IP City Lite database by default. No account, no license key, no sign-up \u2014 it works immediately after activation.<\/p><\/dd>\n<dt id=\"where%20do%20i%20get%20a%20maxmind%20license%20key%3F\"><h3>Where do I get a MaxMind license key?<\/h3><\/dt>\n<dd><ol>\n<li><a href=\"https:\/\/www.maxmind.com\/en\/geolite2\/signup\">Create a free MaxMind account<\/a><\/li>\n<li>Log in and go to Account &gt; Manage License Keys<\/li>\n<li>Generate a new license key and accept the GeoLite2 EULA if prompted<\/li>\n<li>Paste the key into Settings &gt; MDL Local Geo Lookup<\/li>\n<\/ol><\/dd>\n<dt id=\"where%20is%20the%20geolocation%20database%20stored%3F\"><h3>Where is the geolocation database stored?<\/h3><\/dt>\n<dd><p>The <code>.mmdb<\/code> file is stored in your WordPress uploads directory: <code>wp-content\/uploads\/mdl-local-geo-lookup\/<\/code>. The filename depends on the selected source (DB-IP or MaxMind). The GeoIP2 PHP reader library is bundled inside the plugin folder and does not need to be downloaded separately.<\/p><\/dd>\n<dt id=\"how%20often%20is%20the%20database%20updated%3F\"><h3>How often is the database updated?<\/h3><\/dt>\n<dd><p>By default, every 7 days. You can set any value between 1 and 30 days in the plugin settings. DB-IP publishes a new database on the first of each month. MaxMind publishes updates on the first Tuesday of each month.<\/p><\/dd>\n<dt id=\"what%20happens%20if%20the%20selected%20source%20and%20installed%20database%20do%20not%20match%3F\"><h3>What happens if the selected source and installed database do not match?<\/h3><\/dt>\n<dd><p>The plugin tracks which source last downloaded the installed MMDB file. If there is a mismatch, the settings page displays a warning and prompts you to run a manual database update before relying on the data.<\/p><\/dd>\n<dt id=\"does%20this%20work%20behind%20cloudflare%3F\"><h3>Does this work behind Cloudflare?<\/h3><\/dt>\n<dd><p>Yes. When Cloudflare is in front of your site, the plugin automatically reads the real visitor IP from the <code>CF-Connecting-IP<\/code> header.<\/p><\/dd>\n<dt id=\"can%20i%20use%20this%20with%20form%20builders%3F\"><h3>Can I use this with form builders?<\/h3><\/dt>\n<dd><p>Yes. Place the <code>[mdlgeo_visitor_info]<\/code> shortcode inside a hidden field in Elementor Forms, Contact Form 7, WPForms, Gravity Forms, or any HTML form. The visitor's detected location is submitted along with the form data.<\/p><\/dd>\n<dt id=\"what%20data%20does%20the%20visitor%20log%20record%3F\"><h3>What data does the visitor log record?<\/h3><\/dt>\n<dd><p>When logging is enabled, each entry contains: serial number, timestamp, IP address, country, city, postal code, timezone, and coordinates. Logging is disabled by default.<\/p><\/dd>\n<dt id=\"is%20the%20visitor%20log%20publicly%20accessible%3F\"><h3>Is the visitor log publicly accessible?<\/h3><\/dt>\n<dd><p>No. An <code>.htaccess<\/code> file and an <code>index.php<\/code> file are created in the logs directory on activation to block direct web access.<\/p><\/dd>\n<dt id=\"does%20this%20work%20on%20wordpress%20multisite%3F\"><h3>Does this work on WordPress Multisite?<\/h3><\/dt>\n<dd><p>The plugin is designed for single-site installations. It can be activated per-site on a multisite network, but network-wide activation is not officially supported.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Detect visitor location from a self-hosted IP geolocation database \u2014 no external API calls, no per-request latency, no usage limits.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/306589","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=306589"}],"author":[{"embeddable":true,"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/mondaydigitallab"}],"wp:attachment":[{"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=306589"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=306589"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=306589"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=306589"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=306589"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=306589"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}