Take control of who can reach your WordPress site. Wonderful Geoblocking Countries lets you block three areas independently — the whole public site, the login page, and the user registration form — each with its own country list and its own message.

Wonderful Geoblocking Countries settings page with per-area block/allow mode

For every area you choose the mode that fits: a block list (keep out visitors from the selected countries) or an allow list (let in only the selected countries and block everyone else). Blocked visitors receive an HTTP 403 response with your own message (basic HTML allowed).

Privacy-first geolocation: country lookups run locally on your server against the free IP2Location LITE database — no visitor IP is ever sent to a third-party API. The database installs with your personal download token and refreshes itself automatically about once a month (which you can switch off at any time).

Built-in safety rails: logged-in administrators are never blocked, the WordPress admin and the login page stay reachable from the site-access rule, and visitors whose country cannot be determined are always let through — so you cannot lock yourself out by accident.

For developers: a wonderful_geoblocking_countries_country_for_ip filter lets other plugins reuse the local IP2Location country lookup for any IP address, without a hard dependency on this plugin — $country = apply_filters( 'wonderful_geoblocking_countries_country_for_ip', '', $ip );.

Current version 1.0.1 — coming soon, not yet released on WordPress.org.