Upgrading to Version 6.0

2025/09/16: Feature Change, New Feature, Premium, v6.0, WPf2b

Initially, version 6.0 is a Premium-only release.

TL;DR

Most things work as before and most settings are updated correctly, but not all.

  • Note your settings before starting, especially Comments and Remote IPs.
  • You must update the filters,
  • If you were using WP_FAIL2BAN_USE_AUTHPRIV, remove the entry from wp-config.php,
  • If you have a jail using the log file generated by the LOG_USER facility (usually /var/log/messages), define WP_FAIL2BAN_USE_LOG_USER in wp-config.php:

    define('WP_FAIL2BAN_USE_LOG_USER', true');

  • Check your settings (switch to "Advanced settings"), especially Comments and Remote IPs.

Changes

Updated Filters
The filters have been completely reworked, and are mostly not backward compatible. You must update them for existing features to continue to work.
New Constants
WP_FAIL2BAN_USE_LOG_USER
Prior to v6 the default facility for some events was LOG_USER which typically goes to /var/log/messages. This has changed to map to the default "auth" facility, usually LOG_AUTHPRIV.
You can revert to pre-v6 behaviour by defining WP_FAIL2BAN_USE_LOG_USER as true (see TL;DR above). Check the docs for more details.
Removed Constants
WP_FAIL2BAN_USE_AUTHPRIV
Removed, replaced by WP_FAIL2BAN_USE_LOG_AUTH.

WP_FAIL2BAN_LOG_COMMENTS_EXTRA
Deprecated in v5.0, now removed. Replaced by WP_FAIL2BAN_LOG_COMMENT_ATTEMPTS.
WP_FAIL2BAN_LOG_COMMENTS_LOG
Deprecated in v5.0, now removed. Replaced by WP_FAIL2BAN_COMMENT_ATTEMPT_LOG.
WP_FAIL2BAN_PLUGIN_LOG_*
Redundant. Responsibility for controlling whether to log events is delegated to plugins.
Database Schema
The virtual lookup columns have been dropped and replaced by a lookup table. Conversion is automatic (but not instant), and can be reversed if you need to revert to v5.

The conversion is done in batches. The batch size can be controlled by setting WP_FAIL2BAN_EX_LOOKUP_TABLE_UPDATE_BATCH; the default is 10,000 rows. The conversion process runs hourly, and when the Site Health tool is run.