• I am locked out of my WP.

    I was logged in and updated everything after a while (plugins, theme, everything). Then I tried to add a page, but WP wouldn’t allow me saying that I needed a higher level of permissions. That’s very odd, so I thought I had logged in with the wrong account (one is Developer one is Admin, although I think both should be able to add pages) and logged out.

    After that, when I try to log in, the login page just reloads. No messages whatsoever, so I am guessing that the plugin which is protecting me (Limit Login Attempts or something like that) is now keeping me from entering my website, but I might be wrong.

    I have tried with email and user name. Neither will work. This is my first WordPress so I wouldn’t know how to troubleshoot, and I don’t know what information is relevant to share here.

    Any help will do. Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @muvuth,

    I am suggesting you to create a new Admin user with a piece of code that helps you log in if you forget old user details.

    You can change passwords directly from the database from the users table and it must be encrypted.

    function wpb_admin_account(){
    $user = ‘Username’;
    $pass = ‘Password’;
    $email = ’[email protected]’;
    if ( !username_exists( $user ) && !email_exists( $email ) ) {
    $user_id = wp_create_user( $user, $pass, $email );
    $user = new WP_User( $user_id );
    $user->set_role( ‘administrator’ );
    } }
    add_action(‘init’,’wpb_admin_account’);

    Make sure you can’t use the same email address, so if you have used email then for temporarily, you have to change that email address from the database.

    Thread Starter muvuth

    (@muvuth)

    Thank you @parin96 for your suggestion.

    Can I do that while locked out? If not, I need to solve the login issue first, and then I’ll see how to follow your suggestion.

    Thank you

    Yes Muvuth, you can create user from that code without login.
    You need to add that code in fuction.php file of your active theme.

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