| 开发者 | mondaydigitallab |
|---|---|
| 更新时间 | 2026年6月1日 15:41 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPL-2.0+ |
| 版权网址: | 版权信息 |
[mdlgeo_visitor_info] shortcode to display visitor location on any page or postmdlgeo_get_visitor_geo_data() PHP function for use in themes and custom pluginsCF-Connecting-IP when Cloudflare headers are presentzlib, pharmdl-local-geo-lookup folder to /wp-content/plugins/The GeoLite2-City.mmdb file is stored in your WordPress uploads folder:
wp-content/uploads/mdl-local-geo-lookup/GeoLite2-City.mmdb
The GeoIP2 PHP reader library is bundled inside the plugin folder and does not need to be downloaded.
By default, every 7 days. You can set this to any value between 1 and 30 days in the plugin settings. MaxMind releases updated GeoLite2 databases on the first Tuesday of each month.
The plugin tracks which source last downloaded the installed MMDB file. If the selected source and installed file source do not match, the settings page shows a warning and asks you to run a manual database update. If the installed MMDB source is unknown, the plugin also prompts you to download or update the database before relying on source alignment.
Yes. The plugin uses the free DB-IP database by default — no account or license key needed. MaxMind GeoLite2 is available as an optional alternative in Settings.
Yes. When Cloudflare is in front of your site, the plugin reads the real visitor IP from the CF-Connecting-IP header automatically.
Visitor logging is disabled by default. When enabled in Settings, each frontend page load by a non-logged-in visitor appends one line to visitors.log containing: serial number, timestamp, IP address, country, city, postal code, timezone, and coordinates.
No. The visitor log stores IP addresses and approximate location data only, and those entries are not linked to durable identifiers such as email addresses. Because of that, the plugin does not register the visitor log with WordPress personal data export or erasure tools.
No. An .htaccess file and an index.php file are created in the logs directory on activation to block direct web access.
Yes. You can place the [mdlgeo_visitor_info] shortcode inside a hidden field in Elementor Forms, Contact Form 7, WPForms, Gravity Forms, or any HTML form. The visitor's location data will be submitted along with the form. See the "How to Use" section in the settings page for examples.
The plugin is designed for single-site use. It can be activated per-site on a multisite network, but network-wide (network activation) is not officially supported. Each site manages its own database and settings independently.