WPThumbs
Themes Plugins By purpose By industry Best-of lists Fix it guides
Free Plugin by brstefanovic v2.3.2

Advanced Country Blocker

An advanced security plugin that blocks website visitors by country, with additional features like blacklisting, logging blocked attempts, admin bypas …

Advanced Country Blocker

The facts

Rating
5★ from 6
Active installs
2k+
Price
Free
Last updated
6 Feb 2026
Added
Jan 2025
Requires WP
5.0
Tested up to
WP 6.9.7
Requires PHP
7.2
Downloads
14,894

Our analysis

AI-assisted

Advanced Country Blocker is a WordPress plugin designed to enhance site security by restricting access based on the visitor's country or IP address. Upon activation, it automatically allows access from the admin's country while blocking all others unless they use a specific secret key. The plugin can use an external geolocation service or an offline database for country detection.

This plugin is suitable for site administrators who want to control access based on geographical location. It offers features like real-time activity monitoring, customizable block messages, and manual IP management, making it a versatile tool for enhancing site security.

Best for: This plugin suits WordPress site administrators looking to restrict access based on visitor location.

What it does well

  • Automatically allows access from the admin's country
  • Supports both external and offline geolocation methods
  • Customizable access controls with allowlist or blocklist options
  • Includes CAPTCHA challenge for blocked visitors
  • Real-time activity monitoring and detailed logging

Where it falls short

  • No information on specific compatibility with themes or other plugins
  • Limited details on user experience or support options

Verdict

Advanced Country Blocker provides robust geolocation-based access control for WordPress sites, but lacks detailed user experience information.

From the developer

brstefanovic's own description of Advanced Country Blocker, lightly tidied.

Advanced Country Blocker helps you secure your WordPress site by restricting access based on the visitor’s geolocation (country) or IP address. Upon activation, the plugin detects the activating admin’s country and automatically sets that as the only allowed country. All other visitors from different countries are blocked, unless they use a secret key parameter to temporarily whitelist their IP. Country detection uses the privacy-friendly ip-api.com service by default but can be switched to a fully offline MaxMind GeoLite2 (or compatible) database file once you configure a local copy.

Key Features:

  • Automatically allows the admin’s country on plugin activation.
  • Flexible IP-to-country lookups – start with the built-in ip-api.com integration and optionally switch to an offline MaxMind GeoLite2 Country (or compatible) .mmdb database file.
  • Allowlist or blacklist mode – choose whether the country list acts as an allowlist or blocklist without re-entering countries.
  • Temporary access via a customizable secret URL parameter (e.g., ?MySecretKey=1).
  • CAPTCHA Challenge – allow blocked visitors to solve a CAPTCHA to gain temporary access (supports Google reCAPTCHA v2/v3, hCaptcha, Cloudflare Turnstile).
  • Real-Time Activity Monitor – live dashboard showing active visitors, recent blocks, and traffic statistics.
  • Analytics Dashboard – comprehensive charts and statistics about blocked attempts.
  • Manual blacklisting and safelisting of IPs for added security and to accommodate uptime monitors.
  • Optional email alerts when new visitors are blocked.
  • Admin bypass so logged-in admins can always access the site (toggleable in the code).
  • Detailed logging of blocked attempts in a custom database table, displayed in the WP admin.
  • Custom response controls – personalise the block page title/message, choose the HTTP status (403, 410, 451) or redirect to any URL.
  • Automatic log cleanup with configurable retention plus a one-click “Clear Logs” button.

Use the plugin settings page (Country Blocker menu in WP admin) to configure the list of allowed countries, blacklisted countries, blacklisted IPs, and whether email alerts are enabled.

License

This plugin is open-sourced software licensed under the GPLv3 or later.

External Services

By default this plugin contacts the ip-api.com geolocation service to detect visitor countries. You can disable all external lookups by switching the IP lookup method to the local MaxMind database in the settings.

Read the full description on the official page →

Tagged as

Alternatives

Other plugins for securing a site.

Really Simple Security

Easily improve site security with WordPress Hardening, Two-Factor Authentication (2FA), Login Protection, Vuln...

Free 3M+ installs 4.9★ (8,862)
Wordfence Security

Firewall, Malware Scanner, Two Factor Auth, and Comprehensive Security Features, powered by our 24-hour team....

Free 5M+ installs 4.7★ (4,983)
Akismet Anti-spam: Spam Protection

The best anti-spam protection to block spam comments and spam in a contact form. The most trusted antispam sol...

Free 5M+ installs 4.7★ (1,186)
Loginizer

Loginizer is a WordPress security plugin which helps you fight against bruteforce attacks.

Free 1M+ installs 4.8★ (1,030)
Safe SVG

Enable SVG uploads and sanitize them to stop XML/SVG vulnerabilities in your WordPress website.

Free 1M+ installs 4.9★ (79)
All-In-One Security

Protect your website investment with All-In-One Security (AIOS) – a comprehensive and easy to use security plu...

Free 1M+ installs 4.7★ (1,715)