BLACK FRIDAY
Save 59% on PageForge Annual $191/year $485/year
Claim 59% Off →
Country Access Control by CodeCaste icon
Actively maintained Tested with WP 7.1

Country Access Control by CodeCaste

Restrict front-end access by visitor country using a local IP database. No external APIs are used at runtime.

Active installs<10New
Downloads · 30d85• 0% vs prev. 30d
Rating—0 reviews
Health score64/100Good
All-time downloads75Since Sep 2026
Support resolved—No recent threads
RequiresWP 5.8PHP 7.4+
Downloads · 7d85• 0% week over week
Our verdict

Solid choice

Country Access Control by CodeC… is a solid plugin choice in 2026, with a few things worth checking first. Was last updated 4 days ago, and scores 64/100 on our health check.

  • Actively developed — last update 4 days ago
  • Tested with the latest WordPress (7.1)
  • Small user base (<10 active installs)
  • Very few reviews so far

How does it stack up?

Side-by-side on installs, updates, ratings & support

Daily downloads

102030Sep 29Sep 30Oct 2
Yesterday10
Daily average (1y)21
Peak day40Sep 29, 2026
Last 12 months85

Download spikes usually follow a new release — each site that auto-updates counts as a download.

Rankings

Where Country Access Control by C… stands today

WordPress.org search rankings

Live position in the plugin search, top 100
KeywordPositionCompeting pluginsCategory
access-control >100 6,949 Best access-control plugins →
country >100 4,434 Best country plugins →
geo blocking >100 258 Best geo blocking plugins →
geolocation >100 849 Best geolocation plugins →
security >100 10,000 Best security plugins →

About Country Access Control by CodeCaste

From the official readme · v1.0.1

Description

The issue we kept running into

On client sites, “block visitors from these countries” sounds simple — until you look at how most tools do it. Many geolocation plugins phone home on every request, or they lean on a third-party lookup API. That means extra latency, another service in the critical path, and a privacy story that is harder to explain to a client.

We also saw the other failure mode: the rule looks correct in settings, but a full-page cache (LiteSpeed, WP Rocket, Cloudflare HTML cache, host caching) keeps serving a previously allowed page to someone who should be blocked — or the reverse.

What we think about it

Country access control has to be local-first. The decision for a visitor should happen on your server, against data you control, without a round trip to an external API on every page view.

And because the response depends on who is visiting, page caching cannot treat every visitor as if they got the same HTML. If your cache layer ignores that, geo rules will look broken even when the plugin logic is fine.

Why we built this

Country Access Control (the product we also call Geo Lockdown) is our answer for WordPress shops that need country allow/block rules without shipping visitor IPs to a lookup API at runtime.

Lookups run against IP range data stored in your site’s MySQL/MariaDB tables. You choose when to refresh that data. Admin, login, and common WordPress endpoints stay reachable so you do not lock yourself out while testing.

What you get

  • Allow-list or block-list country modes with a searchable country selector
  • Local IPv4 and IPv6 IP-to-country lookups (no external API call while enforcing)
  • MySQL/MariaDB storage — no PHP SQLite3 extension required
  • Administrator bypass to help prevent lockouts
  • Automatic bypass for wp-admin, wp-login.php, REST API, AJAX, WP-Cron, and XML-RPC
  • Verified Googlebot bypass using reverse DNS and forward confirmation (User-Agent alone never bypasses)
  • Configurable trusted proxy / CDN headers, with Cloudflare connecting-IP validation against official Cloudflare ranges
  • Custom blocked message (403) or redirect to a URL you choose
  • Optional blocked-request logging
  • IP lookup cache with configurable TTL, plus a one-click Clear Lookup Cache action
  • Diagnostics panel and a Test IP tool so you can see what the plugin decides before you go live
  • Optional one-click download of the free DB-IP Country Lite dataset, imported through staging tables and an atomic swap

How to use it

  1. Install and activate the plugin.
  2. Go to Settings → Country Access Control.
  3. Open the Diagnostics panel and confirm the detected IP looks right (especially if you use Cloudflare or another proxy).
  4. Click Download Latest Database so you are not relying on the limited starter dataset in production.
  5. Choose Allow or Block mode, select the countries, set the blocked response, then enable Country Access Control.
  6. Save settings, then purge your site/page cache (see below) and test from a real visitor perspective — private/incognito while logged out is the easiest check.

Things to take care of (please read this)

1. Download a full GeoIP database before you trust the results

The plugin ships with a small starter dataset so it activates cleanly. That is enough to explore settings — not enough for production accuracy. Use Download Latest Database under the GeoIP Database panel. Nothing about your site or visitors is sent; only the public CSV file is fetched when an administrator clicks the button.

2. Page caching and CDNs

When Country Access Control is enabled, the plugin marks front-end responses as non-cacheable for common cache plugins (including LiteSpeed Cache, WP Rocket, and WP Super Cache style APIs) and purges those caches when you save settings.

That still does not cover every stack. If your host, CDN, or another plugin caches full HTML at the edge, you can get stale allow/block decisions until that cache is cleared or told not to cache HTML for the public site.

After you enable the plugin or change countries / response settings:

  • Purge the page cache in LiteSpeed, WP Rocket, W3 Total Cache, WP Super Cache, SiteGround Optimizer, or whatever you use
  • If Cloudflare (or another CDN) caches HTML, purge that cache too — or exclude the public HTML pages from cache while geo rules are active
  • Use Clear Lookup Cache in the plugin sidebar if you just updated the GeoIP database and want fresh lookups immediately

If rules still look wrong after a purge, open Diagnostics, run a Test IP, and confirm the detected IP / country before digging into theme or security-plugin conflicts.

3. Proxies, Cloudflare, and real visitor IPs

If the site sits behind Cloudflare or another reverse proxy, enable Cloudflare support and/or configure trusted proxies and the correct connecting-IP header. Otherwise the plugin may see the proxy IP instead of the visitor, and country decisions will be wrong.

4. Do not test blocks while logged in as an administrator

Administrator bypass is on by default (and wp-admin / wp-login are always bypassed). Turn administrator bypass off only while testing, and use a private window while logged out.

5. Honest limitation

This is IP-to-country mapping, not a GPS check. VPNs, proxies, Tor, and similar tools can present an IP from another country. No IP-only system can guarantee a person’s physical location.

External services

This plugin can optionally connect to one external service, DB-IP (db-ip.com), solely to let you download an updated GeoIP dataset.

What it is and what it’s used for: DB-IP publishes a free, monthly-updated “IP to Country Lite” CSV database under a Creative Commons Attribution 4.0 license. When you click Download Latest Database under Settings → Country Access Control, the plugin fetches that public CSV.GZ file directly from https://download.db-ip.com/ and imports it into your site’s own database. Country lookups for your visitors always run locally afterward — DB-IP is never contacted while your site is actually enforcing geo-restrictions, only when an administrator explicitly requests a database update.

What data is sent: Nothing about your site, its visitors, or their IP addresses is sent to DB-IP. The request is a plain HTTP GET for a public, static file; no query parameters, cookies, or identifying data are included.

When it’s used: Only when an administrator manually clicks “Download Latest Database.” It never runs automatically, on a schedule, or in the background.

Service links: db-ip.com · Free Lite database & license terms

Installation

  1. Upload the codecaste-country-access-control folder to /wp-content/plugins/
  2. Activate the plugin through the Plugins menu
  3. Go to Settings → Country Access Control
  4. Download the latest GeoIP database, choose Allow or Block mode, select countries, then enable Country Access Control
  5. Purge your page/CDN cache and verify with Diagnostics / a logged-out browser session

Frequently asked questions

Does this plugin call an external API for every visitor?

No. Country lookups run against your local MySQL/MariaDB data. The only documented external connection is the optional, administrator-triggered DB-IP database download.

Will page caching break country blocking?

It can, if a full-page or CDN cache serves the same HTML to every visitor. The plugin asks common WordPress cache plugins not to store those responses and purges them when settings change — but you should still purge host/CDN caches after enabling or changing rules. See “Things to take care of” above.

Does this require the PHP SQLite extension?

No. GeoIP data is stored in MySQL/MariaDB tables, which every WordPress site already uses.

Can I update the IP database?

Yes. Click Download Latest Database under Settings → Country Access Control to fetch the current free DB-IP Country Lite CSV.

Will I lock myself out of wp-admin?

No. wp-admin and wp-login.php are always bypassed. Logged-in administrators can also bypass restrictions by default.

Will Googlebot be blocked outside the allowed countries?

Not when Allow verified Googlebot is enabled (default). Crawlers are verified by reverse DNS hostname and forward confirmation back to the same IP. A spoofed Googlebot User-Agent alone does not bypass the geo block.

Does it support Cloudflare or reverse proxies?

Yes. Trusted proxy/CDN headers can be configured, and Cloudflare source ranges are validated before those headers are trusted.

Changelog

1.0.1

  • Fix: Redirect response type failed silently for bare-domain URLs (e.g. https://www.google.com/) because the loop-prevention check treated their empty path as “no URL configured”
  • Fix: Redirect response type used wp_safe_redirect(), which blocks any target outside the site’s own domain; switched to wp_redirect() since the URL is admin-configured
  • Fix: “HTTP 403 with message” and “Custom message (403)” incorrectly shared the same message field; each option now behaves independently
  • Removed manual CSV database upload feature; database updates now go only through Download Latest Database

1.0.0

  • Initial release

Full changelog on WordPress.org →

Screenshots

Full settings screen — General rules, blocked response, safety bypasses, performance, diagnostics, and GeoIP database status
Full settings screen — General rules, blocked response, safety bypasses, performance…
General — enable Country Access Control, choose allow/block mode, select countries, and set the blocked visitor response
General — enable Country Access Control, choose allow/block mode, select countries, and…
Safety and Bypass — administrator bypass, Cloudflare support, system bypasses, Googlebot verification, and trusted proxies
Safety and Bypass — administrator bypass, Cloudflare support, system bypasses, Googlebot…
Performance and Logging — Cache TTL, blocked-request logging, and log retention
Performance and Logging — Cache TTL, blocked-request logging, and log retention
Diagnostics — current IP, detected country, lookup timing, final decision, and Test IP tool
Diagnostics — current IP, detected country, lookup timing, final decision, and Test IP…
GeoIP Database — download the latest free DB-IP Country Lite dataset and clear the lookup cache
GeoIP Database — download the latest free DB-IP Country Lite dataset and clear the lookup…

For developers

Is this your plugin? Show off the numbers.

Add a live badge to your site, docs or GitHub README. It updates on its own — no account needed.

Active installs badge Rating badge Health score badge

Best Country Access Control by Cod… alternatives

All access-control plugins →
Alternatives
Rank Plugin Active installs Rating Updated Health
1 PublishPress Capabilities: User Role Access Control, Admin Area Permissions PublishPress Capabilities: User Role Access Control, Admin… User role editing for WordPress. Manage user roles, control capabilities and permissions… by PublishPress 100K+ ★★★★★★★★★★ 4.7 (143) 2 weeks ago 90
2 Restrict User Access – Ultimate Membership & Content Protection Restrict User Access Create Access Levels and restrict any post, page, category, etc. Supports bbPress… by Joachim Jensen 10K+ ★★★★★★★★★★ 4.3 (94) 1 month ago 72
3 PublishPress Permissions: Access Control, Content Permissions, User Access PublishPress Permissions: Access Control, Content Permissio… The permissions plugin for posts, pages, categories, tags and more. You can control… by PublishPress 10K+ ★★★★★★★★★★ 4.3 (66) 2 weeks ago 91
4 Groups – Memberships and Access Control Groups – Memberships and Access Control Turn your site into a powerful membership solution. Manage members, teams and access to… by itthinx 10K+ ★★★★★★★★★★ 4.8 (382) 1 week ago 93
5 SureMembers – Membership & Content Restriction Plugin SureMembers – Membership & Content Restriction Plugin Protect your content, build memberships, and control who sees what on your WordPress site… by Brainstorm Force 2K+ ★★★★★★★★★★ 5 (2) 4 weeks ago 67
6 Quick Download Button Quick Download Button Add stylish download buttons to any post or page — 7 styles, countdown, popup modal, access… by sidocode 2K+ ★★★★★★★★★★ 4.6 (12) 5 months ago 59
7 SimpleShop SimpleShop The SimpleShop WP plugin connects your WordPress website with a SimpleShop account and… by Redbit s.r.o. 1K+ ★★★★★★★★★★ No reviews 1 month ago 66
8 Menu By User Roles Menu By User Roles Menu By User Roles allows you to control the visibility of menu items based on user roles. by kahnu044 1K+ ★★★★★★★★★★ 5 (3) 1 year ago 43
9 Groups 404 Redirect Groups 404 Redirect Redirect 404's when a visitor tries to access a page protected by Groups. by itthinx 1K+ ★★★★★★★★★★ 4.6 (10) 1 week ago 80
10 Geo Blocker – Control Site Access by Region and IP Geo Blocker – Control Site Access by Region and IP 🔐 Block or allow visitors by country. Track access attempts. View analytics. Stay in… by Mohamed Shili 1K+ ★★★★★★★★★★ 5 (1) 1 year ago 32

FAQ

Country Access Control by CodeCaste: quick answers

Straight answers, pulled from live WordPress.org data.

Live data from WordPress.org · checked Oct 3, 2026

Is Country Access Control by CodeC… free?

Yes. Country Access Control by CodeC… is free to download and use from the official WordPress.org plugin directory.

Is Country Access Control by CodeC… safe to use in 2026?

Country Access Control by CodeC… is a solid plugin choice in 2026, with a few things worth checking first. Was last updated 4 days ago, and scores 64/100 on our health check.

How many websites use Country Access Control by CodeC…?

Country Access Control by CodeC… is active on <10 WordPress websites and has been downloaded 75 times since it launched in September 2026. It was downloaded 85 times in the last 30 days.

Does Country Access Control by CodeC… work with WordPress 7.1?

Yes. The developer has tested Country Access Control by CodeC… up to WordPress 7.1.2, the latest release. It requires WordPress 5.8 or newer.

What PHP version does Country Access Control by CodeC… need?

Country Access Control by CodeC… requires PHP 7.4 or higher. Most hosts run PHP 8.x today, so it works on any modern WordPress hosting.

When was Country Access Control by CodeC… last updated?

The latest version, 1.0.1, was released on September 29, 2026 (4 days ago).

Who makes Country Access Control by CodeC…?

Country Access Control by CodeC… is developed and maintained by CodeCaste.

What are the best alternatives to Country Access Control by CodeC…?

The most popular alternatives to Country Access Control by CodeC… are PublishPress Capabilities:… (100K+ installs), Restrict User Access (10K+ installs) and PublishPress Permissions: A… (10K+ installs).

Powered by PageForge

Want thousands of pages that rank like these? Build them in an afternoon.

This directory runs on the same engine as PageForge. Turn any spreadsheet, CSV or API into thousands of fast, SEO-ready WordPress pages — with schema, internal links and AI-written copy baked in.

  • CSV, Google Sheets & API data sources
  • AI content, schema & internal links per page
  • Works with Elementor, Gutenberg, Yoast & Rank Math
  • Free on WordPress.org — no credit card
Sarah is here to help!
Hi there! 👋 Need help finding what you're looking for?
Sarah
Sarah
Online & Ready to Help
Hi there! 👋 Need help finding what you're looking for?

We'll use this to continue our conversation

Just now ✓ Verified

Join 500+ SEO Pros Scaling Their Strategy

Get exclusive programmatic SEO tactics, AI content workflows, and the latest PageForge updates delivered straight to your inbox. Stay ahead of the algorithm.

We care about your data in our privacy policy.