Support » Plugin: WP Fail2Ban Redux » where to add the filters?

  • Resolved blau


    Hi, kindly could I know where should we add the filers such as wp_fail2ban_redux_blocked_users ?

    As descried in

    In functions.php or in the plugin directory’s wp-fail2ban-redux.php ? And hor to survive plugin/theme upgrades?

    Not in wp-config.php as it crashes the site.

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Brandon Allen


    Hi @blau,

    The filters can go in their own plugin, or you can put them in your theme’s functions.php file.

    Thank you Brandon, I put it in the plugin wp-fail2ban-redux.php file, it works well, hope it survives next upgrade.
    Thank you for porting the original wp-fail2ban plugin, have a nice day.

    Plugin Author Brandon Allen



    Placing it there will not survive the next plugin upgrade.

    You either need to create your own plugin, and then place those filters in that plugin, or you need to place the filters in the functions.php file of your theme. If you’re using a child theme that doesn’t already have a functions.php file, you can create one, and place the filters there.

    • This reply was modified 2 years, 3 months ago by Brandon Allen. Reason: spelling error

    @thebrandonallen thank you, I created a dedicated plugin for the additional filter settings.
    Renaming the administrator user and blocking “admin” via fail2ban has been the single biggest security improvement in my sites.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘where to add the filters?’ is closed to new replies.