Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Kris – WPMU DEV Support

    (@wpmudevsupport13)

    Hi @loveservices

    I hope you are doing good today.

    Could you temporarily disable Defender Via FTP and try to log in again to the site?
    Please navigate to /wp-content/plugins/ folder and rename “wp-defender” to “wp-defender_”. This should temporarily disable the plugin and you should be able to log in to the site.

    After that rename back plugin folder to the original name and activate the plugin from the dashboard. While you will be still logged in, you will be able to add your IP to the whitelist in Defender -> Firewall -> IP Banning -> Allowlist.

    Kind Regards,
    Kris

    Thread Starter loveservices

    (@loveservices)

    Hi Kris,

    I already tried that and it didn’t work. I googled for solutions and found that idea on a previous support post.

    I have tried renaming the folder and I’ve tried adding the code to the functions.php file to remove the plugin entirely.

    /B

    Thread Starter loveservices

    (@loveservices)

    Note: the directory on my site is /web/content/wp-content/plugins/defender-security

    Why isn’t it named wp-defender?

    Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @loveservices,

    Note: the directory on my site is /web/content/wp-content/plugins/defender-security

    Yes, that’s the correct directory name. Seems like we accidentally mentioned the directory name of the Pro version sorry about that. Since you have already tried renaming the folder name ie for example:

    From:
    /wp-content/plugins/defender-security

    To:
    /wp-content/plugins/defender-securiity-off

    And still, the issue exists then it has to do more with the cache. The above action disables the Defender plugin and once the plugin is disabled there isn’t any way Defender would be able to lock you out.

    Most probably you have a server-side cache that might be serving a cached page? Could you please double-check whether you have cleared the cache in the server-side? Please do double-check with your host regarding this too.

    The following snippet should also help to whitelist your IP:

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

    Where you’ll have to replace the $ip variable with our current IP. The above code can be added as a mu-plugins. Please check this link on how to implement the above code as a mu-plugins:
    https://premium.wpmudev.org/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins

    Please do let us know how that goes. Looking forward to your response.

    Best Regards,
    Nithin

    Thread Starter loveservices

    (@loveservices)

    Hi Nithin,

    Yes, that worked, thank you. I renamed the plugin directory, cleared the cache on Cloudflare, and added that code.

    I’ve now been able to access this site again and removed the plugin for now.

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Locked out of my entire site’ is closed to new replies.