Skip to content

Wordfence on WordPress: setup baseline and the alerts that matter

A WordPress Wordfence install left on defaults emails you about everything and tells you about nothing important. The baseline configuration and the three alert classes that justify the inbox traffic.

Wordfence is the most-installed WordPress security plugin. It is also the most-ignored, because the default configuration sends a daily email digest that mixes “someone failed a login from Vietnam” with “core file has been modified” and treats both as the same urgency. After two weeks the admin filters Wordfence to a folder and stops reading. The fix is not switching plugins. It is a one-hour baseline pass that turns Wordfence into a security signal source instead of inbox noise.

What’s happening

Wordfence ships three engines: a WAF that runs as a auto_prepend_file PHP filter, a malware scanner that compares site files against a known-good hash database, and a login security layer (rate-limit, 2FA, CAPTCHA). Each engine has its own alert categories. The default install enables alerts for all categories at the lowest severity threshold, which is why the email volume is unreadable.

The three categories that are worth waking up for: core or plugin file integrity changes (somebody modified wp-admin/admin.php), administrator-role logins from an IP that never logged in before, and WAF block rate spikes above baseline. Everything else — failed logins from the public internet, 404s, blocked-country requests — is background noise that belongs in a weekly summary, not a real-time alert.

How to verify

Inspect the current Wordfence configuration via WP-CLI on a WordPress install:

wp plugin list | grep -i wordfence
wp option get wordfence_alertEmails
wp option get wordfence_alertOn_loginLockout
wp option get wordfence_alertOn_adminLogin
wp option get wordfence_alertOn_nonAdminLogin
wp option get wordfence_alertOn_scanIssues
wp option get wordfence_alertOn_severityLevel

Then look at what Wordfence has been blocking — the live activity table is in the database:

wp db query "SELECT COUNT(*), action FROM wp_wfHits \
  WHERE ctime > UNIX_TIMESTAMP(NOW() - INTERVAL 7 DAY) \
  GROUP BY action ORDER BY COUNT(*) DESC;"

If the top action is blocked:wfsnrepeat (Wordfence Premium IP reputation block) at 50,000 hits per week, that traffic should never produce an email — it is doing its job silently. If the top action is blocked:waf with 200 hits per week, those deserve eyes because a real attack pattern shows up there.

The fix

  1. Disable noisy alerts. In Wordfence → All Options → Alerts, turn off “Alert when someone is locked out from login,” “Alert when a non-admin user signs in,” and “Alert when the lifetime of a user account is reached.” These fire constantly on any public site.
  2. Keep three alert categories on. “Alert when an administrator signs in” with the option to send only on new device or location. “Alert when a core, theme, or plugin file is changed” — this is the signal that a backdoor was just dropped. “Alert when Wordfence is severely deactivated or its WAF is set to learning mode unexpectedly.”
  3. Set the severity threshold to High or Critical. Wordfence severity levels run Low → Medium → High → Critical. Anything Medium or below is a recommendation, not an incident. Configure the alert threshold accordingly in Scan → Scan Options.
  4. Schedule the scan correctly. The default is once a day at a random hour, which collides with your backup window. Set it to a known low-traffic hour and exclude the directories that genuinely change daily (cache, uploads if you trust them — usually you should not).
  5. Enable the WAF in production mode, not learning mode, after one week of learning. The learning-mode banner is itself an alert: if it persists, the WAF is wide open.
  6. Send alerts to a real address. Not the site admin’s personal inbox. A shared alerts mailbox monitored by whoever does on-call, with a filter that routes Wordfence Critical to PagerDuty or the equivalent.

The blocking and scanning work happens regardless of the alert configuration; what changes is whether you find out about a real incident the same hour or the next quarterly audit. Stack Harbor configures Wordfence to this baseline as part of managed enterprise WordPress hosting onboarding, including the alert routing into the shared on-call channel. If your Wordfence emails are in a filter folder you stopped reading, book a security review.