Skip to content

Pierre-Lannoy/wp-ip-locator

Repository files navigation

IP Locator

version php wordpress license

IP Locator is a country and language detection tool for WordPress. It is fast, reliable and plug & play.

See WordPress directory page or official website.

IP Locator can detect and render the country, the main language and the country flag of each visitor of your site. It provides:

  • a strong, accurate and ultra-fast IP and country detection;
  • many shortcodes to display country names, languages and flags (emoji or vectorized);
  • a shortcode to conditionally hide or show strings or other shortcodes;
  • a CSS modifier to add a country-specific class to the body tag of your site;
  • an automatic system to be always up to date (no API key, no IP data files to manually import);
  • a full-featured API for plugins / themes developers.

For full details, you can browse the shortcodes list or the API description (for developers).

IP Locator can be used too to report the following main items and characteristics:

  • KPIs: number of detected countries and languages, accesses breakdown and detection ratio;
  • countries for real humans with public IPs;
  • languages for real humans with public IPs;
  • metrics variations;
  • full list of countries per channel;
  • full list of countries per client (requires the free Device Detector plugin).

Technically, IP Locator:

  • works on dedicated or shared servers;
  • can detect the source IP even behind proxies or load-balancers;
  • can use AWS CloudFront, Cloudflare and Apache mod_geoip to speed-up detection;
  • natively supports APCu caching(1) and all other dedicated object caching mechanisms, like Memcached or Redis;
  • has a minimal footprint in the page rendering time;
  • runs its data updates in background, without impact on the website speed;
  • is fully compatible with multisites;
  • natively supports names and languages localizations(2).

(1): APCu needs to be activated on your server if you want to use it in IP Locator.

(2): PHP Intl extension needs to be activated on your server if you want to use it in IP Locator.

IP Locator is part of PerfOps One, a suite of free and open source WordPress plugins dedicated to observability and operations performance.

The development of The PerfOps One plugins suite is sponsored by Hosterra - Ethical & Sustainable Internet Hosting.

IP Locator is a free and open source plugin for WordPress. It integrates many other free and open source works (as-is or modified). Please, see 'about' tab in the plugin settings to see the details.

WP-CLI

IP Locator implements a set of WP-CLI commands. For a full help on these commands, please read this guide.

Hooks

IP Locator introduces some filters and actions to allow plugin customization. Please, read the hooks reference to learn more about them.

Installation

WordPress method (recommended)

  1. From your WordPress dashboard, visit Plugins | Add New.
  2. Search for 'IP Locator'.
  3. Click on the 'Install Now' button.

You can now activate IP Locator from your Plugins page.

Contributions

If you find bugs, have good ideas to make this plugin better, you're welcome to submit issues or PRs in this GitHub repository.

Before submitting an issue or a pull request, please read the contribution guidelines.

⚠️ The master branch is the current development state of the plugin. If you want a stable, production-ready version, please pick the last official release.

Smoke tests

WP compatibility PHP compatibility