• Resolved eerdag

    (@eerdag)


    After I upgrade the latest version, I cannot access to my admin page.
    I am having the message below:
    “The Defender file with the random key does not exist.”

    Do you have any recommendation to fix the problem? I can access my site via SSH.

    Thank you.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Jair – WPMU DEV Support

    (@wpmudevsupport15)

    Hi @eerdag,

    I hope you are doing well today!

    You can follow this procedure;
    – Login to SSH and go to your site’s /wp-content/plugins folder
    – Rename defender-security folder to some other name to deactivate the plugin.
    – Login to your WordPress dashboard and activate the plugin again

    Please let us know how it goes, above process should create a file for Defender under /wp-content folder which is missing and the cause of the issue.

    Kind regards,
    Zafer

    Thread Starter eerdag

    (@eerdag)

    Hi Zafer,
    It worked, thank you. I tried your recommendation before however I tried to reach the “Masking URL slug” page and I couldn’t. Now I can reach my admin page.

    But I have another problem now. I cannot reset my Google Auth login info. I already removed the config from my Google Authenticator App. When I try to set it up again, I don’t see a QR code.

    Plugin Support Nebu John – WPMU DEV Support

    (@wpmudevsupport14)

    Hi @eerdag,

    When I try to set it up again, I don’t see a QR code.

    That’s because you already had Google Authenticator App configured. You will have to reset the Defender 2FA configuration for the user and the following workaround can help you with this.

    <?php
    // Defender deactivate 2auth for specific user
    add_action( 'admin_init', function(){
    
        if ( 'user_login' === wp_get_current_user()->user_login ) {
    
            global $wp_filter;
            $tag             = 'current_screen';
            $hook_method    = 'maybe_redirect_to_show_2fa_enabler';
            $hook_class     = 'WP_Defender\\Controller\\Two_Factor';
    
            if ( ! isset( $wp_filter[$tag] ) ) {
                return;
            }
    
            foreach ( $wp_filter[$tag]->callbacks as $key => $callback_array ) {
    
                foreach ( $callback_array as $c_key => $callback ) {
    
                    if ( substr_compare( $c_key, $hook_method, strlen( $c_key ) - strlen( $hook_method ), strlen( $hook_method ) ) === 0 ) {
                        if ( $callback['function'][0] instanceof $hook_class ){
                            unset( $wp_filter[$tag]->callbacks[$key][$c_key] );
                        }
                    }
                }
            }
        }
    
    } );

    In the above code, please replace “user_login” with the username that you need to reset 2FA. Please add the code using a mu-plugin. You can find how to add a mu-plugin here in our documentation: https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins

    I hope that helps. Please feel free to get back to us if you need any further assistance.

    Kind Regards,
    Nebu John

    Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @eerdag,

    Since we haven’t heard from you for a while. I’ll mark this thread as resolved for now. Please feel free to re-open the thread if you need further assistance.

    Best Regards
    Nithin

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘After Upgrading to 3.5.0; I Cannot Reach My Admin Panel’ is closed to new replies.