Support » Fixing WordPress » Locked myself out of admin

  • I changed my admin password and I guess I wrote it down wrong and I can’t get back in.

    I have WordFence and BPS on there that limits my log in attempts and will eventually block my IP if I keep trying variations.

    Is there anyway to get back into my Dashboard to reset my admin password?

Viewing 15 replies - 1 through 15 (of 15 total)
  • I host with Network Solutions

    Ok,
    I’m not familiar with Network Solutions. Do you have access to you database (phpMyAdmin)?

    You could also reset the password via ftp:
    paste this into your themes function php:
    wp_set_password( 'password', 1 );
    ‘password’ ist the new password
    the number needs to be the User ID. By default 1

    After you then are able to login, make sure to go back and remove that code. It will reset your password on every page load until you do.

    I’m in the FTP file database but I don’t know what to look for

    Go to the base directory of you installation
    wp-content/themes/your-theme-directory/
    then download the functions.php
    pase the code I wrote above right after this line:
    <?php

    Went to – the base directory of you installation
    Went to – wp-content/themes/your-theme-directory/
    then downloaded the functions.php
    pasted the code I wrote above right after this line:
    <?php
    wp_set_password( ‘password’, 1 );

    Saved it.

    Tried to log in as admin with ‘password’
    locked me out

    Locked you out or “You do no have sufficient permissions to access this site”?

    Locked out for too many login attempts. I must wait 30 minutes

    I have WordFence and BPS Security. Limit Log-In attempts to 5 then timeout. Then it will eventually block my IP

    Was hacked before…

    You can simply disable the BPS Security and WordFence by by renaming the respective folder in wp-content/plugins/

    The best way to reset the password is by changing it in the database.

    Julian

    Should wp_set_password( ‘password’, 1 ); have a (<) before it?

    yes but usually you functions.php begins with <?php so just place is the line beneath <?php

    <?php
    <wp_set_password( ‘password’, 1 );
    /**
    * @package WordPress
    * @subpackage U-Design
    */

    Like that?

    Do I log in with Username: admin?

    This is what happened:

    Parse error: syntax error, unexpected ‘<‘ in /data/9/2/77/143/2566795/user/2813911/htdocs/wp-content/themes/u-design/functions.php on line 2

    I just asked someone to help me directly. Thank you for your time.

    This has several ways to deal with a password.
    https://codex.wordpress.org/Resetting_Your_Password

    The best way to reset the password is by changing it in the database.

    Maybe, but not the easiest. Try more simple methods before messing with the database ( Occam’s razor).

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