PHPackages                             ip2location/magento2-ip2location-countrystateblocker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. ip2location/magento2-ip2location-countrystateblocker

ActiveMagento2-module[Security](/categories/security)

ip2location/magento2-ip2location-countrystateblocker
====================================================

Block visitors by country.

1.0.1(8y ago)6112[1 issues](https://github.com/ip2location/magento2-ip2location-countrystateblocker/issues)MITPHPPHP ~5.5.0|~5.6.0|~7.0.0

Since Jun 30Pushed 2y ago2 watchersCompare

[ Source](https://github.com/ip2location/magento2-ip2location-countrystateblocker)[ Packagist](https://packagist.org/packages/ip2location/magento2-ip2location-countrystateblocker)[ RSS](/packages/ip2location-magento2-ip2location-countrystateblocker/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

IP2Location Country Blocker
===========================

[](#ip2location-country-blocker)

This plugin enable Magento users to easily redirect or block visitors based on their geo location. Below are the key features of this plugin

- Block visitors by country
- Block visitors by IP address
- Redirect visitors to correct store by country

This plugin support the use of [IP2Location Free LITE BIN database](https://lite.ip2location.com) or [IP2Location web service](https://www.ip2location.com/web-service) for geolocation lookup.

- IP2Location LITE BIN download path:
- IP2Location web service registration path:

IPv4 BIN vs IPv6 BIN
--------------------

[](#ipv4-bin-vs-ipv6-bin)

Use the IPv4 BIN file if you just need to query IPv4 addresses.

Use the IPv6 BIN file if you need to query BOTH IPv4 and IPv6 addresses.

Installation Guide
------------------

[](#installation-guide)

1. Under the Magento installation directory, please create sub directory `app/code/Hexasoft/IP2LocationCountryBlocker`.
2. Upload the files in this repository to that directory.
3. Open terminal or command line then navigate to Magento installation directory.
4. Enable IP2Location Country Blocker extension by following commands,

    ```
    php -q bin/magento cache:disable
    php -q bin/magento module:enable --clear-static-content Hexasoft_IP2LocationCountryBlocker
    php -q bin/magento setup:upgrade
    php -q bin/magento cache:enable

    ```
5. Open your web browser, login to Magento as administrator and navigate to Store &gt; Configuration &gt; IP2Location &gt; Country Blocker.
6. Configure the correct database path or API key. The module will use Web service as first priority, if API key is provided.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3239d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d5fbe791b4a8d666a158043146d73380f05a0bea9062f0fa0852bf82f6bc762c?d=identicon)[ip2location](/maintainers/ip2location)

---

Top Contributors

[![ip2location-com](https://avatars.githubusercontent.com/u/6367210?v=4)](https://github.com/ip2location-com "ip2location-com (10 commits)")[![chrislim2888](https://avatars.githubusercontent.com/u/3418232?v=4)](https://github.com/chrislim2888 "chrislim2888 (1 commits)")

---

Tags

ip-addressip-address-web-serviceip-blockerip-countryip-databaseip-redirectionmagentoip2locationmagento2blockerredirector

### Embed Badge

![Health badge](/badges/ip2location-magento2-ip2location-countrystateblocker/health.svg)

```
[![Health](https://phpackages.com/badges/ip2location-magento2-ip2location-countrystateblocker/health.svg)](https://phpackages.com/packages/ip2location-magento2-ip2location-countrystateblocker)
```

###  Alternatives

[smile/elasticsuite

Magento 2 merchandising and search engine built on ElasticSearch

8044.5M33](/packages/smile-elasticsuite)[jeremykenedy/laravel-blocker

10371.5k](/packages/jeremykenedy-laravel-blocker)[smile/module-elasticsuite-cms-search

Smile Elasticsuite - Cms Pages Search Module for Smile Elasticsuite.

25916.7k1](/packages/smile-module-elasticsuite-cms-search)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
