| 开发者 | ipgeolocation |
|---|---|
| 更新时间 | 2026年9月30日 18:21 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
/wp-content/plugins/.No. Administrators are automatically excluded from redirects, and by default they are never blocked by IP rules either. You can change that in Advanced settings.
Known bots (Google, Bing, Facebook, X and others) are excluded from country redirects. IP rules do not skip them, because any browser can claim to be a search engine. To exempt a crawler from an IP rule, add its addresses to your safe list.
Yes. IP data is cached for 24 hours per IP.
Yes. Choose the Cloudflare option under Advanced settings. The plugin only trusts Cloudflare's headers when the request genuinely came from a Cloudflare server, so nobody can pretend to be at a different address.
No. API results are cached, and IP rules are a simple local check with no lookup involved.
No. Blocking by IP address works without a key. Country features need one.
The settings screen shows it at the top of the IP section, with a button that adds it to your safe list.
Your site is probably behind a CDN or proxy, which replaces the address your server sees. Open Advanced settings and choose the option that matches your setup, then check the address again after saving.
Add this line to your wp-config.php file, log in, fix the rule, then remove the line:
define( 'IPGEO_DISABLE_IP_ACCESS', true );
The plugin normally refuses to save a rule that would lock you out, so this should be rare.
Yes, since 1.3.0. A page cache serves a stored copy of a page without running WordPress, so a visitor's country cannot be checked while the page is built. With "Cached page support" on (the default), every page carries a small script that asks your site what to do for each new visitor, using the same rules the server uses, and then remembers the answer. It works with WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Super Cache, Cloudflare, Varnish, and host caches alike. Visitors on uncached pages are still redirected instantly by the server.
Only if blocked visitors are never served a cached copy. While visitor blocking rules are active, the plugin stops public pages from being cached (Settings > Page caching). If you would rather keep caching, enforce the block at your CDN instead, for example with a Cloudflare WAF rule, and turn that option off. Sites that already had blocking rules active when they updated to 1.3.0 keep their previous behaviour until they turn it on.
Use "Test a visitor" at the bottom of the settings page, or define IPGEO_DEBUG as true in wp-config.php: every response then carries an X-IPGeo-Decision header naming the reason, such as excluded, already_redirected or no_rule_for_country.
Yes. Enter the codes separated by commas, for example GR, CY.
You choose, above the redirect rules: every visit (the default for new installs), once per browser session, once per hour or once per day. Each rule can override it under How Often, for example every visit for your local store and once per day for a promotion. Sites that used the plugin before 1.4.0 keep once per hour, the earlier behaviour, until they change it. Visitors who choose to stay, through a ?geo_bypass=1 link or by answering "No" to a popup, are never redirected for 30 days.
The answer, for 30 days. "Yes" sends the visitor to the other site automatically on later visits, "No" keeps them on this one. If you change the destination of the rule, visitors are asked again. Closing the popup without answering asks again in the next browser session.
It is added when a visitor is sent to another site. If that site also runs this plugin, it stops the two sites from sending the visitor back and forth, and the plugin there removes it from the address bar. If the other site does not run this plugin, nothing can remove it there: switch off "Add ?ipgeo_from=1 when sending visitors to another site" above the redirect rules.
Use a private browser window, and open a new one after changing location. Or add ?geo_reset=1 to the address, which clears everything the plugin remembers about you.