| 开发者 | watrix |
|---|---|
| 更新时间 | 2026年9月13日 13:13 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
/contact/) too many times in a short windowrobots.txt; only bots that ignore it will ever follow it.htaccess / nginx snippet and block those IPs in front of PHP.
Reduce what you expose
A separate screen, Bot Guard → Hardening, turns down the amount of information your site hands out to anyone who asks. Every switch there is off by default and can be turned on one at a time.
/wp-json/wp/v2/users to anyone, and the slug it returns is usually the login name. Turning this on returns 401/403 to visitors without the list_users capability, while logged-in editors, the block editor and application-password integrations keep working exactly as before. The oEmbed endpoint keeps answering, because other sites rely on it to embed your posts – only the author_name and author_url fields, which carry the same slug, are dropped. The rest of the REST API is untouched – the WooCommerce Store API, contact form plugins and the block editor all keep their endpoints.X-Content-Type-Options, X-Frame-Options, Referrer-Policy, Permissions-Policy, Strict-Transport-Security and Content-Security-Policy, each with its own switch. A header another plugin has already sent from PHP is never sent twice. Headers added by nginx or Apache are invisible to PHP, so check the real response once after switching something on. HSTS is only ever sent over HTTPS, and includeSubDomains / preload stay off unless you deliberately ask for them. CSP has no default value at all: it ships empty, front-end only, and can be tried as Content-Security-Policy-Report-Only first.<meta name="generator"> tags emitted by WordPress core, WooCommerce and Site Kit by Google, in HTML and in the feeds.init, before the main query runs.htaccess, nginx deny, and a plain IP list for your analytics tool's internal-traffic filterwp bot-guard top | blocks | block | unblock | mode | export | settings | cleanup/wp-content/plugins/ or install it from the Plugins screen./contact/).Not in log-only mode – nothing is blocked at all. In enforce mode the default thresholds (20 hits on one page within 60 minutes, 30 404s within 10 minutes) are far beyond what a human does. Logged-in users and verified search-engine crawlers are excluded, and you can add your own IP ranges to the allow list. If your monitoring service fetches your site with curl or a similar tool, add its IP to the allow list or remove that signature from the bad user-agent list.
REMOTE_ADDR by default. Only switch to CF-Connecting-IP or X-Forwarded-For if your site actually sits behind Cloudflare or another reverse proxy – those headers can be forged by clients otherwise.
Blocking happens inside WordPress, so a blocked request still reaches PHP (but stops on init, before the query). To keep the load off entirely, paste the generated .htaccess or nginx snippet into your server configuration.
Rule evaluation runs on uncached requests only. Cached pages served by a caching plugin or CDN are never counted, so the plugin is most effective on pages that are not cached, such as forms.
The admin interface is currently written in Japanese and is fully translatable through the watrix-bot-guard text domain.
<meta name="generator"> is now removed as well. It carries more than a version number - it also lists the active feature flags and settings of the installation. Elementor already skips the tag when its own "Generator Tag" setting is set to Disable, so the plugin makes that option read as disabled on the front end rather than reaching into Elementor's internals. Its settings screen keeps showing, and saving keeps writing, the value you actually chose.wxag_hide_generator action is the place to hang any handling of your own.tests/run-tests.sh). It is not part of the distributed plugin./wp/v2/users and /wp/v2/users/<id> can now be closed to anyone without the list_users capability. The endpoints stay in the route index and keep answering logged-in users with the capability, so the block editor's author picker and application-password integrations are unaffected. /wp/v2/users/me is left alone, and so is a user reading their own record by id, so a theme or block that looks an author up by id keeps working. Route matching is case-insensitive, the same way WordPress itself matches routes, so /wp/v2/Users cannot be used to walk around it. The oEmbed endpoint keeps working - it is how other sites embed your posts - but its author_name and author_url fields, which leak the same slug, are dropped for visitors without the capability. One visible side effect: fetching posts with _embed returns an error object in place of _embedded.author; the posts themselves are unaffected. No other namespace is touched - the WooCommerce Store API, contact form plugins and the block editor keep working, which is not the case with the blunt "disable the REST API" switch other plugins offer.X-Content-Type-Options, X-Frame-Options, Referrer-Policy, Permissions-Policy, Strict-Transport-Security and Content-Security-Policy, each behind its own switch. Headers already sent from PHP by another plugin are not sent a second time; headers added by the web server itself are invisible to PHP and can still end up duplicated, so the screen tells you to check the real response once. HSTS is suppressed entirely unless the site is served over HTTPS, and includeSubDomains and preload are off by default with a warning next to them. CSP ships empty, applies to the front end only and can be run as Content-Security-Policy-Report-Only.<meta name="generator"> tags from WordPress core, WooCommerce and Site Kit by Google, in HTML and in the feeds. The ?ver= query string on CSS and JS is deliberately left in place, because removing it breaks cache busting.Domain Path header and a languages/watrix-bot-guard.pot template so the plugin can be translated on translate.wordpress.org.wp bot-guard ai to show the status, --refresh to fetch now, and --check=<ip> --ua=<user-agent> to test a single request./product/%E6%A5%B5hepa/ was recorded as /product/-/, so non-ASCII slugs could not be logged or matched correctly. Paths are now decoded before they are stored and compared.wag_ to wxag_ to comply with the WordPress.org guidelines. Existing options and tables are migrated automatically.init.