Setting up MaxMind GeoLite2 for real country detection 

Compliance Copilot Advanced Last updated: September 20, 2026

Country-restricted jurisdiction warnings are only as good as the country detection behind them; Out of the box, Compliance Copilot Pro can read a CDN-provided country header if your host or CDN sets one – but that’s inconsistent across hosting setups, and plenty of sites don’t have one at all. MaxMind’s GeoLite2 database gives you a real, server-side IP-to-country lookup that doesn’t depend on your CDN configuration.

This is a one-time setup with a recurring weekly database refresh handled automatically afterward – the manual part is getting your first database downloaded.

What You’ll Learn

  • How to get a free MaxMind Account ID and License Key
  • How to connect those credentials and download the GeoLite2-Country database
  • How the database stays up to date after the initial download
  • What happens before you’ve set any of this up, and how to troubleshoot a failed download

Getting a MaxMind Account ID and License Key

  1. Go to MaxMind’s GeoLite2 signup page and create a free account.
  2. Once logged in, go to your MaxMind account’s Manage License Keys section and generate a new license key.
  3. Note your Account ID (shown on your account dashboard) and the License Key you just generated – you’ll need both.

There’s no cost for a GeoLite2 account or for downloading the Country database.

Connecting Your Credentials

  1. In your WordPress dashboard, go to Compliance Copilot > Settings.
  2. Under Geolocation (MaxMind GeoLite2), enter your MaxMind Account ID and MaxMind License Key.
  3. Click Save.
  4. Below the form, click Update Database Now. This button stays disabled until both credential fields are saved.
  5. Once the download finishes, the status badge changes from “No database yet” to “Database installed,” along with a last-updated timestamp.

From this point on, country lookups for jurisdiction warnings use the local database first – no per-request calls to MaxMind, no dependency on your CDN. See Restricting jurisdiction warnings to specific countries to put the detection to use.

How the Database Stays Current

MaxMind publishes new GeoLite2 data periodically, and Compliance Copilot Pro re-downloads it automatically once a week in the background using the same credentials you already entered – you don’t need to click Update Database Now again unless you’re troubleshooting or just want to force a refresh immediately.

Before You Set This Up

Without MaxMind credentials or a downloaded database, country-restricted jurisdiction warnings fall back to a CDN-provided country header (for example, Cloudflare’s CF-IPCountry) if your site happens to have one. If it doesn’t, country restriction can’t determine a visitor’s location and the warning fails open – it shows rather than silently hiding, on the assumption that showing an unnecessary warning is safer than hiding a required one.

Troubleshooting a Failed Download

  • “MaxMind returned an unexpected response” – double-check your Account ID and License Key for typos, and confirm the license key hasn’t been revoked in your MaxMind account.
  • “The PHP Phar extension is required” – your hosting environment doesn’t have the Phar extension enabled, which the plugin needs to unpack the downloaded database. Ask your host to enable it, or switch to a host that includes it by default (most managed WordPress hosts do).
  • “Could not write the downloaded database to disk” – your wp-content/uploads directory isn’t writable by PHP. Check folder permissions with your host.
  1. MaxMind GeoLite2 Free Geolocation Data – developer documentation
  2. GeoLite2 End User License Agreement

Real country detection powers country-restricted jurisdiction warnings as part of the full Compliance Copilot Pro feature set.

Forgot password? 0 View Cart