WordPress Country Blocking Standard
One-Time Setup (First Site Only)
Create a MaxMind Account
- Go to https://www.maxmind.com/en/geolite2/signup
- Sign up using the Flourish business email
- Confirm the email and set a strong password
This account is reused for all client sites. You only do this step once.
Per-Site Setup (Every New Site)
Step 1: Download the GeoLite2 Country Database
- Log in to your MaxMind account
- In the left sidebar, click Download Files (under the GeoIP2 / GeoLite2 section). Direct URL: https://www.maxmind.com/en/accounts/current/geoip/downloads
- Find the row labeled GeoLite2 Country (not City, not ASN)
- Click Download GZIP in that row
- Save the file to your computer (it will be named something like
GeoLite2-Country_YYYYMMDD.tar.gz) - Extract the file (double-click on Mac; use 7-Zip or similar on Windows)
- Inside the extracted folder, locate the file named
GeoLite2-Country.mmdb. That’s the only file you need.
Note: Ignore any prompts from MaxMind about generating a license key or setting up GeoIP Update. Those are for automated command-line tools that IQ Block Country does not use.
Step 2: Install IQ Block Country
- In the WordPress admin, go to Plugins > Add New
- Search for “IQ Block Country”
- Install and activate the plugin by Pascal
- Go to Settings > IQ Block Country
Step 3: Upload the GeoLite2 Database to the Site
The IQ Block Country plugin cannot auto-download the MaxMind database due to a license conflict between MaxMind’s license and the WordPress plugin repository. You must upload it manually.
Upload destination: /wp-content/uploads/ (the file goes directly in that folder, with its original filename GeoLite2-Country.mmdb)
Upload method (choose one):
- FTP/SFTP (FileZilla, Transmit, etc.): Connect to the site, navigate to
/wp-content/uploads/, and drag theGeoLite2-Country.mmdbfile into the folder. - Host file manager (cPanel, SiteGround Site Tools, WP Engine User Portal, etc.): Log in to the hosting control panel, open the file manager, navigate to
public_html/wp-content/uploads/, and use the Upload button to add the file.
Verify the upload: Go back to WordPress admin > Settings > IQ Block Country. On the Home or Tools tab, you should see a message confirming the GeoIP database was detected, with a date stamp.
Step 4: Configure Frontend Blocking (Public Site)
- Click the Frontend tab (may be labeled “Block visitors”)
- Choose “Block all countries except those selected below” (the whitelist/inverse-selection option; exact wording varies by version)
- Select these countries from the list (Ctrl/Cmd+click to multi-select):
- United States
- Canada
- Paste the standard block message (see Step 6 below), updating the contact email for the client
- Check “Allow search engines to bypass the country block” (critical for SEO)
- Save Changes
Step 5: Configure Backend Blocking (wp-admin and Login)
- Click the Backend tab (may be labeled “Block admin” or “Block wp-admin”)
- Choose the same “block all except selected” option
- Select only:
- United States
- Enable blocking for wp-login.php
- Go to the Whitelist IP tab and confirm your current IP is listed (the plugin usually adds it on activation; double-check to avoid locking yourself out)
- Save Changes
Step 6: Standard Block Message
Use this as the frontend block message, updating the contact email per client:
We’re sorry, but this website is currently only available to visitors from select regions. If you believe you’ve reached this page in error, please contact us at [client-email@domain.com] and we’ll be happy to help.
Step 7: Test the Configuration
- Open an incognito window and load the site from your normal location to confirm it loads normally
- Go to https://geopeeker.com, enter the site URL, and check how it loads from Germany, Singapore, or Brazil. Those should show the block message.
- Run the site through Google’s Rich Results tool (https://search.google.com/test/rich-results) to confirm Googlebot is not blocked
- Log into wp-admin from your normal location to confirm you are not locked out
- Check the plugin’s Statistics or log tab after 24 hours to confirm blocks are happening
Travel and Whitelist Procedures
When You (Flourish) Travel Internationally
Before leaving, choose one of these approaches:
Option A: IP whitelist (best for stable connections)
- Once you know where you’ll be working from (hotel, rental, coworking space), get your IP at https://whatismyipaddress.com
- Log into wp-admin before you leave, or use a US-based VPN to get in from abroad
- Go to Settings > IQ Block Country > Whitelist IP tab
- Add the IP with a dated comment (e.g., “Jackie travel 2026-05-15 to 2026-05-30”)
- Remove the entry when you return
Option B: Temporarily allow the country (best for changing locations)
- Before leaving, log into wp-admin and add the destination country to the Backend allow list
- Remove it when you return
- Document the change in the client’s maintenance log
Option C: Static-IP VPN (best long-term solution if you travel often)
A VPN service with a dedicated US exit IP lets you connect as if you’re home, no whitelist changes needed. NordVPN, ProtonVPN, and Mullvad all offer dedicated IPs as an add-on for a few dollars a month. Once set up, whitelist that one static IP across all client sites and you’re covered indefinitely.
Emergency Lockout Recovery
If you get locked out (whitelisted IP changed, forgot to add the country, etc.):
- Access the site via FTP/SFTP or the host file manager
- Navigate to
/wp-content/plugins/ - Rename
iq-block-countrytoiq-block-country-OFF - Log in to wp-admin, adjust settings as needed
- Rename the folder back to
iq-block-countryto re-enable
Whitelisting Someone Else (Client, Vendor, Traveling Patron)
- Ask them for their IP from https://whatismyipaddress.com
- Add it on the Whitelist IP tab with a dated comment
- Remove when no longer needed
Allowing a Country Temporarily
If the client has an event drawing visitors from a specific country (e.g., a UK-based touring show):
- Add the country code to the Frontend allow list before the event
- Remove it after the event ends
- Document the change in the client’s maintenance log
Maintenance
- Database updates: MaxMind releases updates to the GeoLite2 Country database roughly monthly. Since the plugin cannot auto-update, manually re-download and re-upload the
.mmdbfile quarterly. Add this to the client’s recurring maintenance checklist. - Log review: Every 60 to 90 days during regular maintenance, check the plugin statistics to confirm blocks are happening and that the volume is reasonable.
- Client offboarding: If a client relationship ends, no external cleanup is needed. The database file and plugin remain with the site.
Troubleshooting
Problem: Site owner or editor is locked out of wp-admin Fix: Use the emergency lockout recovery procedure above (rename the plugin folder via FTP).
Problem: Googlebot or Bingbot is being blocked (SEO impact) Fix: Confirm “Allow search engines to bypass” is enabled on the Frontend tab. The plugin verifies bots by reverse DNS, so legitimate bots are allowed automatically once this is on.
Problem: Plugin says the GeoIP database is not detected after upload Fix: Confirm the file is named exactly GeoLite2-Country.mmdb (not the full dated filename) and is placed directly in /wp-content/uploads/. Some plugin versions may also check /wp-content/uploads/iq-block-country/ as an alternate location.
Problem: GA4 still shows international bot traffic after install Fix: Some bots execute JS before the PHP block fires. For persistent issues, add a complementary GA4 filter to exclude known bot traffic, or consider moving that specific site to an edge-level solution.
Problem: Only checkboxes are visible on the Frontend/Backend tab, no “allow/block” toggle Fix: Look for an “Inverse selection” or “Block all except selected” option. If truly absent, update the plugin to the latest version.
Client Documentation Note
When adding this to a client site, note it in the maintenance spreadsheet under a new column or in the site’s handoff notes so future sessions know country blocking is active. This prevents confusion if traffic ever drops unexpectedly. Also add a recurring quarterly reminder to re-upload the GeoLite2 database.