Skip to content

WordPress

Country Blocker Pro – block countries in WordPress

Restrict your site to certain countries, with a free GeoIP database.

  • Version 2.0.0
  • WordPress 5.8+ · PHP 7.4+ · zlib to fetch the database
  • Instant download

About this product

A lot of spam, hacking attempts and fake sign-ups come from countries where your business has no customers. Country Blocker Pro restricts your WordPress site to the countries you choose, or blocks the countries you do not want.

The plugin works with a local GeoIP database (DB-IP Lite) that you fetch for free, without an account or licence key. Lookups happen on your own server, so visitor data is not sent to a third party.

Afraid of locking yourself out? Test mode first shows in the log what would be blocked, and the plugin switches test mode on by itself if a setting would lock you out.

Screenshots

Features

  • Allow or block pick countries from a list with quick choices and a search field.
  • Local GeoIP database DB-IP Lite, updatable monthly, or upload your own .mmdb file.
  • Test mode first log what would be blocked without refusing anyone.
  • Protection against locking yourself out test mode switches on automatically if a setting would block you.
  • Travel mode temporarily allow an extra country, from 1 to 90 days.
  • Exceptions fixed IP addresses and CIDR ranges, logged-in users and verified search engine bots.
  • Cloudflare and proxies the IP address is only read from proxy headers of Cloudflare or your own proxy.
  • Log with statistics masked IP addresses, the last 7 days.
  • Custom block message decide what refused visitors see.
  • Emergency brake add define( 'CBP_GEO_DISABLE', true ); to wp-config.php to switch the filter off at once.

How to install

  1. Upload the zip via Plugins → Add New → Upload Plugin and activate the plugin.
  2. Open the Country Blocker menu and click ‘Fetch database now’, or upload your own .mmdb file.
  3. Choose the countries you want to allow or block and leave test mode on for a few days.
  4. Check the log for visitors that would be blocked but that you want to let in.
  5. Switch test mode off. Behind Cloudflare or your own proxy, configure that under Cloudflare and proxies.

Details and requirements

PlatformWordPress
Version2.0.0
RequirementsWordPress 5.8+ · PHP 7.4+ · zlib to fetch the database
File size27 KB (zip)
DeliveryDigital: download immediately after payment in your account and by email
Supportinfo@daveswebsites.nl

What is new?

  • v2.0.0Free DB-IP database, fetched monthly, or your own .mmdb file.
  • v2.0.0Test mode and protection against locking yourself out.
  • v2.0.0IP address only from headers of Cloudflare or a specified proxy.
  • v2.0.0Travel mode, IP exceptions with CIDR, verified search engine bots and always allow logged-in users.
  • v2.0.0Log with masked IP addresses and statistics, and an emergency brake via wp-config.php.

Frequently asked questions

Does it work without an account or licence key?

Yes. The DB-IP GeoIP database is free and is fetched from your own server. You can also upload your own .mmdb file.

Does the plugin block search engines?

No, you can always allow verified search engine bots (through reverse DNS), so your visibility does not suffer.

What if I lock myself out?

The plugin switches test mode on automatically if a setting would block you. You can also add define( 'CBP_GEO_DISABLE', true ); to wp-config.php to switch the filter off at once.

Does it work behind Cloudflare?

Yes. Enable Cloudflare or your own proxy; only then are IP addresses from the proxy headers trusted.

Is visitor data sent to a third party?

No. Lookups are done locally. Only the database itself is fetched periodically.

How do I receive the product after payment?

As soon as your payment succeeds you can download the zip file on the confirmation page and in your account under Downloads. You also receive an email with the download link. If you pay by bank transfer, the downloads are released as soon as we have received your payment.

Will I get an invoice?

Yes. After payment your invoice is available in your account under Invoices. You can print it or save it as a PDF.

What if I have a question or something does not work?

Send an email to info@daveswebsites.nl describing the problem and your order number. You will get a personal reply.

Need something custom?

Need an adjustment or a completely custom module or plugin? We build it for you.

Get in touch