Linux 软件免费装
Banner图

WT Hardening

开发者 webmastersteam
更新时间 2026年11月12日 23:23
捐献地址: 去捐款
PHP版本: 8.0 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

security brute-force xmlrpc hardening security-headers

下载

1.1.3 1.0.6 1.0.4 1.0.5 1.0.2 1.0.7 1.0.3 1.1.0 1.1.1 1.1.2

详情介绍:

WT Hardening is a lightweight, modular security plugin that turns on the most important WordPress hardening measures without modifying your theme, wp-config.php, or .htaccess. Everything works through WordPress hooks and can be disabled at any moment with a single click. The plugin is completely free, without a PRO version, without ads, and without sending data to external servers. Built by the Webmasters.Team crew for daily WordPress work. Modules What makes it different What WT Hardening does NOT do (by design) For those needs we recommend dedicated plugins (e.g. Wordfence) or an infrastructure layer (Cloudflare, fail2ban).

安装:

Standard install
  1. In the WP admin go to Plugins → Add new.
  2. Search for “WT Hardening”.
  3. Click Install and then Activate.
  4. Open the WT Hardening menu in the admin (shield icon) and configure the modules.
Manual install (via ZIP)
  1. Download the archive from wordpress.org/plugins/wt-hardening.
  2. In the WP admin go to Plugins → Add new → Upload plugin.
  3. Pick the downloaded ZIP, click Install now, and then Activate plugin.
FTP/SFTP install
  1. Unzip the archive.
  2. Upload the wt-hardening folder to wp-content/plugins/ on your server.
  3. In the WP admin go to Plugins → Installed plugins and activate WT Hardening.
After activation all modules are enabled with sensible defaults. If something clashes with your workflow (for example the Jetpack mobile app that needs XML-RPC), just turn off the specific module in the settings.

屏幕截图:

  • Login log: currently locked IPs (IPv6 per /64 network) with an Unlock button, plus a list of recent failed attempts.
  • Event log: logins, lockouts, user changes, plugin activations, theme switches and settings changes.

升级注意事项:

1.1.3 Polish translation update only: the Polish texts now follow the WordPress Polish team glossary. No code or data changes, so the upgrade is safe. 1.1.2 WT Hardening moves into the shared Webmasters.Team menu (Settings, Login log, Event log and About tabs). Old page addresses redirect. No data changes, so the upgrade is safe. 1.1.1 Security fixes: REST API app password logins limited, IPv6 locked per /64, login leaks closed (/?author=1, REST and XML-RPC errors), Cloudflare visitors recognised automatically. HSTS includeSubDomains is now a separate setting (kept on for sites that had HSTS enabled). Recommended for all users. 1.1.0 Security fix: logging in to your own account no longer resets the brute-force counter for the IP. Adds escalating lockouts, IP allowlist, Cloudflare/proxy setting, unlock button and email alerts. 1.0.7 Confirmed compatible with WordPress 7.1. No code changes. 1.0.6 Security fix: the login limiter and event log no longer trust spoofable proxy headers (X-Forwarded-For etc.) by default, closing a brute-force bypass and a targeted-lockout vector. Behind Cloudflare/nginx? Enable the new wt_hardening_trust_proxy_headers filter. Recommended for all users. 1.0.5 New module (on by default) hides the post author’s name and URL from oEmbed responses, a user-enumeration vector picked up by WPScan. Need author attribution in embeds on other sites? Disable it in the settings. 1.0.4 Minor polish to a module description in the Settings panel. No behaviour or data changes. 1.0.3 Confirmed compatible with WordPress 7.0. No code or behavior changes. 1.0.2 The Plugin URI now points to the new landing page on Webmasters.Team. No code or behavior changes. 1.0.1 Compliance update: readme translated to English, escape fixes, safer URL parsing. No data or behavior changes. 1.0.0 First release. Install and activate it; modules are enabled with sensible defaults.

常见问题:

Does the plugin modify wp-config.php or .htaccess?

No. Everything is wired through WordPress hooks. Deactivating the plugin instantly reverts all changes (except HSTS, which browsers cache, so enabling HSTS is a conscious decision).

Will blocking XML-RPC break my mobile app / Jetpack / pingbacks?

Possibly, if you actually rely on them. Disable the XML-RPC module in the settings. The other protection layers stay active.

What happens to the event log on deactivation?

The table stays in the database (useful for later analysis). On full uninstall the tables are dropped cleanly.

Does the plugin work with multisite?

Tested on a single-site install. Settings, tables and cleanup jobs are per site; tables are created on each site the first time the plugin runs there, and uninstalling removes the data from every site of the network. Multisite is not yet formally supported, so file an issue if something breaks.

I locked myself out. What now?

Wait until the lockout expires, log in from another network (e.g. your phone’s mobile data), or ask another administrator to click Unlock under Webmasters.Team → WT Hardening → Login log tab. With WP-CLI access you can remove the lockout directly: wp db query "DELETE FROM wp_wt_hardening_lockouts WHERE ip='1.2.3.4'" (adjust the table prefix; for IPv6 use the /64 network shown in the log, e.g. 2001:db8:1:2::/64). Add your office IP to the allowlist to avoid this in the future.

My site is behind Cloudflare. What should I set?

Nothing. Since 1.1.1 Cloudflare is recognised automatically. When a request comes from Cloudflare’s published IP ranges (updated weekly from cloudflare.com, with a bundled copy as fallback), the visitor address is taken from the CF-Connecting-IP header, also with Site behind Cloudflare / proxy left at No. The header is ignored for requests from any other address, so it cannot be spoofed by hitting your server directly. Choosing Cloudflare explicitly works the same way. Without this every visitor would appear with a Cloudflare IP, so one attacker could lock everyone out.

My site is behind another reverse proxy (nginx, a load balancer). What should I set?

Set Site behind Cloudflare / proxy to Reverse proxy on the local network. X-Forwarded-For is then trusted only from private-network addresses. When the plugin sees such a proxy while the setting is still No, it shows a notice on its admin pages.

What about performance?

Modules only register the hooks they actually need. The event log is a single INSERT per event. No scanner, no background work beyond an hourly and daily cleanup of old rows. Real impact on response time: under 1 ms.

Why is HSTS disabled by default?

Because Strict-Transport-Security has a sticky effect (browsers remember the header for a year). Enabling it too early (before your entire traffic works on HTTPS without errors) can lock users out of the site for a long time. Turn it on once HTTPS is rock-solid. includeSubDomains is a separate setting (off by default) because it also forces HTTPS on every subdomain; preload is never added.

HSTS is on, but the header is missing behind my proxy. Why?

The header is sent only over HTTPS. When HTTPS ends at a proxy, WordPress sees plain HTTP and the plugin relies on the X-Forwarded-Proto: https header, but only from a proxy it trusts: Cloudflare’s IP ranges (always) or, with Site behind Cloudflare / proxy set to Reverse proxy on the local network, a private-network address. From any other address the header is ignored, so it cannot be spoofed.

Does the strong password policy apply to users created through WP-CLI or wp_create_user()?

No. The policy hooks into form validation (profile, registration, reset) and the REST API users endpoints. Programmatic user creation bypasses these hooks by design. For a typical client workflow (users are created through the admin panel) this is enough.

What personal data does the plugin store?

The login limiter stores the IP address and the login typed in failed attempts (kept for the configured counter window, at most 7 days) and in lockouts (kept until 24 hours after they end). The event log stores the user, IP address and event details, including logins typed in failed attempts and the email of new users (kept for the configured retention, 30 days by default). Everything stays in your database. The data is included in Tools → Export Personal Data, and Tools → Erase Personal Data deletes the person’s event log entries and removes their login from attempts and lockouts. The attempt and lockout records themselves, with their IP addresses, are kept until they expire (a security log); the erase tool reports them as retained and explains why. Mention the login security log in your privacy policy: the plugin adds suggested text with the current retention periods to Settings → Privacy → Policy guide.

更新日志:

1.1.3 1.1.2 1.1.1 1.1.0 1.0.7 1.0.6 1.0.5 1.0.4 1.0.3 1.0.2 1.0.1 1.0.0 First release.