Title: Customize / Increase maximum login attempts
Last modified: October 9, 2025

---

# Customize / Increase maximum login attempts

 *  Resolved [Rasso Hilber](https://wordpress.org/support/users/nonverbla/)
 * (@nonverbla)
 * [6 months, 2 weeks ago](https://wordpress.org/support/topic/customize-increase-maximum-login-attempts/)
 * Amazing work on this plugin. Thank you!!
 * A client of mine keeps logging themselves out by attempting too many logins with
   incorrect credentials. After investigation in the source code it seems like currently
   it’s not possible to allow more then 5 failed attempts before blocking an IP.
 * I’d like to have a way to customize this behavior:
    - either via a new setting “10”
    - or, even better, via a filter: `add_filter('sgs_login_attempts', fn () => 
      10)`
 * Because allowing 10 login attempts is still better then turning the feature off
   completely 🙂
 * Hope this feature fill be considered.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Support [Svetoslav Vasev](https://wordpress.org/support/users/svetoslavvasev/)
 * (@svetoslavvasev)
 * [6 months, 2 weeks ago](https://wordpress.org/support/topic/customize-increase-maximum-login-attempts/#post-18674620)
 * Hello [@nonverbla](https://wordpress.org/support/users/nonverbla/) ,
 * Thank you for your positive feedback about the plugin, it’s much appreciated!
 * You’re correct that the plugin’s interface allows you to limit the login attempts
   to a maximum of 5. However, you can manually change the limit by modifying the
   value of the option **sg_security_login_attempts** inside the _prefix\__options
   table of your site’s database. This can be done either via a database management
   tool (such as phpMyAdmin) or via WP-CLI by running the following command, where
   N is a positive integer:
 * wp option set sg_security_login_attempts N
 * This way, you can set a custom limit for the login attempts, such as 7, 10, or
   more/fewer.
 * Best Regards,
   Svetoslav Vasev
 *  Thread Starter [Rasso Hilber](https://wordpress.org/support/users/nonverbla/)
 * (@nonverbla)
 * [6 months, 2 weeks ago](https://wordpress.org/support/topic/customize-increase-maximum-login-attempts/#post-18674769)
 * Thank you so much [@svetoslavvasev](https://wordpress.org/support/users/svetoslavvasev/)
   for the pointer towards the relevant option! This is what I’m doing now:
 *     ```wp-block-code
       add_filter('pre_option_sg_security_login_attempts', fn () => 10);
       ```
   
    -  This reply was modified 6 months, 2 weeks ago by [Rasso Hilber](https://wordpress.org/support/users/nonverbla/).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Customize / Increase maximum login attempts’ is closed to new replies.

 * ![](https://ps.w.org/sg-security/assets/icon-256x256.gif?rev=2971855)
 * [Security Optimizer - The All-In-One Protection Plugin](https://wordpress.org/plugins/sg-security/)
 * [Support Threads](https://wordpress.org/support/plugin/sg-security/)
 * [Active Topics](https://wordpress.org/support/plugin/sg-security/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sg-security/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sg-security/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Rasso Hilber](https://wordpress.org/support/users/nonverbla/)
 * Last activity: [6 months, 2 weeks ago](https://wordpress.org/support/topic/customize-increase-maximum-login-attempts/#post-18674769)
 * Status: resolved