Vai al contenuto
WordPress.org

Italia

  • Temi
  • Plugin
  • Notizie
    • Documentazione
    • Forum
  • Info
    • Manifesto
    • Unisciti alla Community
    • Team
    • Manuali
    • Traduci
    • Meetup italiani
    • WordCamp
    • Five for the Future
    • Proposte di lavoro
    • Swag Store
    • Directory delle foto
    • Learn WordPress
    • Openverse
    • Pattern
    • Playground
    • Prova l’editor Gutenberg
    • WordPress.tv
  • Eventi
  • Scarica WordPress
Scarica WordPress
WordPress.org

Plugin Directory

Login IP & Country Restriction

  • Invia un plugin
  • I miei preferiti
  • Accedi
  • Invia un plugin
  • I miei preferiti
  • Accedi

Login IP & Country Restriction

Di Iulia Cazan
Scarica
  • Dettagli
  • Recensioni
  • Installazione
  • Sviluppo
Supporto

Descrizione

Login IP & Country Restriction hooks into the WordPress authentication system to give you complete control over who can even attempt to access your login page. By default, all access is allowed until you configure specific rules to whitelist or blacklist logins by explicit IP addresses or entire countries.

This plugin is highly effective at stopping massive botnet brute-force attempts before they strain your server resources.

🔒 Core Features (100% Free)

  • IP Restriction: Allow or block specific IP addresses (supports local loops like 127.0.0.1 and IPv6).
  • Country Restriction: Whitelist or blacklist entire countries from accessing the authentication filters.
  • Independent Logic: Run IP rules only, country rules only, or combine both together for maximum security.
  • Smart Redirects: Configure custom behavior to automatically redirect restricted traffic back to the front page.
  • XML-RPC Protection: Secure authentication methods beyond standard web forms.
  • Data Portability: Quickly export and import your security settings, and check status details for debugging.

💎 Take Your Security Further with Pro

Login IP & Country Restriction Pro adds:
* Additional rule types
* Redirect restricted login (404 or 403 with a custom message)
* Lockout duration and individual user lockout
* WooCommerce integration (automatically allow the countries of new customers)
* Bypass the IP and country restrictions for specific roles
* Single IP login per user
* Simulate an IP or country to test your rules

Explore Login IP & Country Restriction Pro →

Important Safety Note: Please ensure you always configure the plugin to allow your own IP address or country before locking down settings so you do not accidentally lock yourself out!

License

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Screenshot

Main configuration dashboard for login restriction rules and XML-RPC methods.
Main configuration dashboard for login restriction rules and XML-RPC methods.
IP restriction interface showing easy management of allowed and blocked IPs.
IP restriction interface showing easy management of allowed and blocked IPs.
Country restriction panel with simple multi-select dropdowns for whitelists and blacklists.
Country restriction panel with simple multi-select dropdowns for whitelists and blacklists.
Redirect settings to manage blocked visitors.
Redirect settings to manage blocked visitors.
Tools layout for importing/exporting configurations and reviewing debug details.
Tools layout for importing/exporting configurations and reviewing debug details.

Installazione

  1. Upload the login-ip-country-restriction folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the Plugins menu in WordPress.
  3. Navigate to the new settings panel to set up your allowed IPs and countries.

FAQ

Do I need a third-party API key for this plugin to work?

No. Out of the box the plugin uses the PHP GeoIP extension when it is available on the server, otherwise the free ipapi.co lookup. Optionally, you can add API keys for the geolocated.io, ip2location.io or geoplugin.net services in the integration settings. The lookup method that works for your server is remembered for a few hours.

My site is behind Cloudflare, what should I do?

Enable the option to trust the Cloudflare visitor IP (HTTP_CF_CONNECTING_IP) in the IPs settings. Enable it only if the site is really behind Cloudflare, because otherwise visitors could spoof that header. Sites that were already using the plugin keep this enabled until the settings are saved.

Can I block both an IP and a country at the same time?

Yes. Both types of restrictions work entirely independently of one another. You can restrict by country, whitelist a few specific external IPs, or use both methods simultaneously.

Help! I locked myself out. What do I do?

If you accidentally lock yourself out by misconfiguring your country or IP whitelist, don’t panic. Simply log into your server via FTP or hosting File Manager, rename the plugin folder from login-ip-country-restriction to login-ip-country-restriction-temp to temporarily disable it, log back into WordPress, rename it back, and correct your configuration.

Recensioni

Does what it needs to do

polfre 5 Luglio 2026
Simple in use and does its job

Great plugin – works wonderfully

dany84 10 Novembre 2025
The plugin stopped all bot attempts to log in onto my website, and I am no longer invaded by notifications of those failed attempts.

Great plugin

laszlobartucz 2 Ottobre 2025
We use a hosting service that oesn't allow for easy country restrictions – this plugin is our saviour.

partially working

blackossian 11 Settembre 2025
it seems it doesn't block South Africa

Not working anymore

eevan79 28 Agosto 2025
Edit: Rating changed because the add-on has been updated and now works. This plugin uses the geoplugin.net service, which is no longer free, so the plugin no longer works either. This is a message: "geoPlugin API is no longer available for free use. To continue access, please upgrade to a paid plan"

Simple but highly effective

mtido 16 Febbraio 2025
I had an increase in incorrect login attempts, it started with a few and then quickly escalated to over 600 per day. From another plugin came the hint with GEO blocking by IP, then I came across this plugin and then had everything blocked except for my own country. Finally only 1-2 per day. Thank you
Leggi tutte le recensioni di 52

Contributi e sviluppo

“Login IP & Country Restriction” è un software open source. Le persone che hanno contribuito allo sviluppo di questo plugin sono indicate di seguito.

Collaboratori
  • Iulia Cazan

“Login IP & Country Restriction” è stato tradotto in 1 lingua. Grazie a chi traduce per il contributo.

Traduci “Login IP & Country Restriction” nella tua lingua.

Ti interessa lo sviluppo?

Esplora il codice segui il repository SVN, segui il log delle modifiche tramite RSS.

Changelog

6.8.3

  • Tested up to 7.1
  • Security hardening: validate the detected IP, capability check on settings save
  • Added the opt-in option to trust the Cloudflare visitor IP header (existing installs keep the current behavior until settings are saved)
  • Fixed the multisite transients cleanup query
  • Fixed the registration redirect also applying to the login page
  • Pro: WooCommerce customers countries collection is compatible with HPOS order storage (the classic storage is still supported)
  • Pro: the lockout duration now locks the user out after a restricted login attempt (the country lookup cache is now fixed at 1 hour); saving the settings clears the lockouts
  • Lower timeout and proper Accept header for IP lookups

See the full changelog for detailed information on changes made in the earlier versions.

Meta

  • Versione 6.8.3
  • Ultimo aggiornamento 4 giorni fa
  • Installazioni attive 8.000+
  • Versione WordPress 5.1 o superiore
  • Testato fino alla versione 7.1.3
  • Versione PHP 7.4 o superiore
  • Lingue

    English (US) e Romanian.

    Traduci nella tua lingua

  • Tag
    block countryblock ipcountry restrictionlogin restriction
  • Visualizzazione avanzata

Valutazioni

4.6 su 5 stelle.
  • 43 recensioni a 5-stelle 5 stelle 43
  • 3 recensioni a 4-stelle 4 stelle 3
  • 3 recensioni a 3-stelle 3 stelle 3
  • 2 recensioni a 2-stelle 2 stelle 2
  • 1 1- recensioni a stelle 1 stella 1

La tua recensione

Vedi tutte le recensioni

Collaboratori

  • Iulia Cazan

Supporto

Hai qualcosa da dire? Ti serve aiuto?

Chiedi nel forum di supporto

Dona

Vuoi supportare lo sviluppo di questo plugin?

Fai una donazione per questo plugin

  • Chi siamo
  • News
  • Hosting
  • Privacy
  • Vetrina
  • Temi
  • Plugin
  • Pattern
  • Learn (Training)
  • Supporto
  • Sviluppo
  • WordPress.tv ↗
  • Partecipa
  • Eventi
  • Donazioni ↗
  • Swag ↗
  • WordPress.com ↗
  • Matt ↗
  • bbPress ↗
  • BuddyPress ↗
WordPress.org

Italia

The WordPress® trademark is the intellectual property of the WordPress Foundation.

  • Visita il nostro account X (ex Twitter)
  • Visita il nostro account Bluesky
  • Visita il nostro account Mastodon
  • Visita il nostro account Threads
  • Visita la nostra pagina Facebook
  • Visita il nostro account Instagram
  • Visita il nostro account LinkedIn
  • Visita il nostro account TikTok
  • Visita il nostro canale YouTube
  • Visita il nostro account Tumblr
Code is Poetry.