| 开发者 | Iulia Cazan |
|---|---|
| 更新时间 | 2026年10月21日 18:36 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.2 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
login-ip-country-restriction folder to the /wp-content/plugins/ directory.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.
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.
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.
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.