Remove an ip address from being locked out without whitelisting

Is it possible to remove an ip address from being temporarily locked out without adding it to the white list.
White listing an ip address doesn't guarantee that the ip will not be misused later. If a client locks themself out by accident, lets saying using a public wifi, I don't want to have to whiltelist a public wifi.
I just want to be able to log in, unblock them, and then go about my business.

  • Ash
    • WordPress Hacker

    Hello zspri

    Would you please try the following code?

    add_filter( 'ip_lockout_default_whitelist_ip', function ( $ips ) {
        $ip    = 'YOUR IP HERE';
        $ips[] = $ip;
    
        return $ips;
    } );

    Set your IP in the $ip variable.

    You can use this code in your child theme's functions.php if the theme is not changed. Otherwise mu-plugin is the best option. To create a mu-plugin, go to wp-content/mu-plugins folder. If there is no mu-plugins folder then, create one. Now, inside the mu-plugins folder create file with name anything.php (make sure file extension is .php). Now start with a <?php tag and then put the above code.

    Hope it helps! Please feel free to ask more questions if you have any.

    Have a nice day!

    Cheers,
    Ash

  • James Morris
    • WordPress Enthusiast

    Hello zspri

    Unfortunately, at this time it is not possible to define temporary or time-based whitelisting. The only way to unblock an IP address without whitelisting is to go into the blacklist and remove the IP from there, if listed. To do this, go to WP Admin -> Defender Pro -> IP Lockouts -> IP Banning and remove the blocked IP from the Banned list.

    I hope this clarifies a bit.

    Best regard,

    James Morris

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.