Title: CountryLock
Author: topsyde
Published: <strong>10.11.2025</strong>
Last modified: 17.11.2025

---

Шукати плагіни

Цей плагін **не перевірявся з останніми 3-ма основними випусками WordPress**. Можливо,
він більше не може розроблятися або підтримуватися, і він може мати проблеми сумісності
при використанні з більш новими версіями WordPress.

![](https://ps.w.org/countrylock/assets/icon-256x256.png?rev=3393258)

# CountryLock

 Від автора [topsyde](https://profiles.wordpress.org/topsyde/)

[Завантажити](https://downloads.wordpress.org/plugin/countrylock.1.0.8.zip)

 * [Деталі](https://uk.wordpress.org/plugins/countrylock/#description)
 * [Відгуки](https://uk.wordpress.org/plugins/countrylock/#reviews)
 *  [Встановлення](https://uk.wordpress.org/plugins/countrylock/#installation)
 * [Розробка](https://uk.wordpress.org/plugins/countrylock/#developers)

 [Підтримка](https://wordpress.org/support/plugin/countrylock/)

## Опис

CountryLock provides a simple, lightweight way to allow or block countries from 
accessing your WordPress site.

It’s designed to be **“set it and forget it”** with no upsells, ads, or complex 
configurations.

### ✨ Key Features

 * **Master Toggle:** Enable or disable the firewall with a single click.
 * **Allowed Countries List:** Specify which two-letter country codes (e.g., `US`,`
   CA`) are allowed. Everyone else is blocked.
 * **Admin Bypass:** Logged-in administrators can always bypass the block (toggleable).
 * **IP Allowlist:** A simple list of IPs or CIDR ranges (like `123.45.67.89` or`
   10.0.0.0/8`) that are always allowed.
 * **Block Logging:** See which countries and IPs are being blocked (toggleable).
 * **Zero-Lookup Detection:** Automatically uses Cloudflare (`HTTP_CF_IPCOUNTRY`)
   and other common server-level GEO headers for instant decisions with zero performance
   impact.
 * **Remote Lookup:** As a fallback, it can query an external service (`ipapi.co`)
   if no headers are found.

### External Services

This plugin uses one external service as a fallback to determine a visitor’s country
if no local GEO headers (like those from Cloudflare or a server-level GeoIP module)
are present.

 * **Service:** `ipapi.co`
 * **What it’s used for:** To look up the country of origin for a visitor’s IP address.
 * **Data Sent:** The visitor’s IP address is sent to the service. This happens 
   _only_ if the “Use remote lookup if no geo headers” setting is enabled AND no
   local GeoIP headers are detected.
 * **Service Policies:**
    - [Terms of Service](https://ipapi.co/terms/)
    - [Privacy Policy](https://ipapi.co/privacy/)

## Встановлення

 1. Upload the `countrylock` folder to the `/wp-content/plugins/` directory.
 2. Activate the plugin through the ‘Plugins’ menu in WordPress.
 3. Go to the new ‘CountryLock’ menu in your admin sidebar.
 4. Configure your allowed countries and toggle the plugin to “Enabled”.

## Відгуки

![](https://secure.gravatar.com/avatar/99621e4c444b170df07631796b5ea935643821db64b81a031de9580df4542585?
s=60&d=retro&r=g)

### 󠀁[Does what it says](https://wordpress.org/support/topic/does-what-it-says-1231/)󠁿

 [TamerDesigns](https://profiles.wordpress.org/dribgib/) 17.11.2025

SUPER lightweight — like very minimal code. And it blocks these visits at the edge
which has DRASTICALLY reduced the # of visits from spam countries like china/india/
russia/etc. that I'm receiving on my sites (that are all local US/CA/MX). It's just
a perfect little addition to reduce hosting costs for my clients.Also — it seems
other plugins do the opposite where you block specific countries, this is arranged
to ALLOW the countries you want, which is way easier with hundreds of countries 
producing spam with AI now.

 [ Прочитати всі 1 відгук ](https://wordpress.org/support/plugin/countrylock/reviews/)

## Учасники та розробники

“CountryLock” — проект з відкритим вихідним кодом. В розвиток плагіну внесли свій
вклад наступні учасники:

Учасники

 *   [ topsyde ](https://profiles.wordpress.org/topsyde/)

[Перекладіть “CountryLock” на вашу мову.](https://translate.wordpress.org/projects/wp-plugins/countrylock)

### Цікавитесь розробкою?

[Перегляньте код](https://plugins.trac.wordpress.org/browser/countrylock/), перегляньте
[сховище SVN](https://plugins.svn.wordpress.org/countrylock/) або підпишіться на
[журнал розробки](https://plugins.trac.wordpress.org/log/countrylock/) за допомогою
[RSS](https://plugins.trac.wordpress.org/log/countrylock/?limit=100&mode=stop_on_copy&format=rss).

## Журнал змін

#### 1.0.8

 * Fix: Corrected admin page structure to prevent other plugins’ notices from appearing
   inside the UI.

#### 1.0.7

 * Fatal Error fix

#### 1.0.6

 * Refactor: Move inline CSS and JS to external files (tscl-admin.css, tscl-admin.
   js) and enqueue them properly.
 * Refactor: Rename all internal prefixes from `cl_` to `tscl_` to meet WordPress.
   org prefixing standards.
 * Refactor: Remove custom 403 page in favor of the standard `wp_die()` screen for
   better compatibility.
 * Fix: Use `filemtime()` for asset versioning to automatically bust cache.
 * Docs: Add `readme.txt` with external service disclosure.

#### 1.0.5

 * Initial public release.

## Мета

 *  Версія **1.0.8**
 *  Останнє оновлення **11 місяців тому**
 *  Активних встановлень **50+**
 *  Версія WordPress ** 5.0 або вище **
 *  Сумісний до: **6.8.11**
 *  Мова
 * [English (US)](https://wordpress.org/plugins/countrylock/)
 * Позначки
 * [block](https://uk.wordpress.org/plugins/tags/block/)[block country](https://uk.wordpress.org/plugins/tags/block-country/)
   [country](https://uk.wordpress.org/plugins/tags/country/)[geo](https://uk.wordpress.org/plugins/tags/geo/)
   [GeoIP](https://uk.wordpress.org/plugins/tags/geoip/)
 *  [Розширений перегляд](https://uk.wordpress.org/plugins/countrylock/advanced/)

## Оцінки

 5 out of 5 stars.

 *  [  1 5-star review     ](https://wordpress.org/support/plugin/countrylock/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/countrylock/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/countrylock/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/countrylock/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/countrylock/reviews/?filter=1)

[Ваш відгук](https://wordpress.org/support/plugin/countrylock/reviews/#new-post)

[Переглянути всі відгуки](https://wordpress.org/support/plugin/countrylock/reviews/)

## Учасники

 *   [ topsyde ](https://profiles.wordpress.org/topsyde/)

## Підтримка

Є що сказати? Потрібна допомога?

 [Перейти в форум підтримки](https://wordpress.org/support/plugin/countrylock/)