Locked out of logging into Main WP

WP Main Dashboard has locked us out after our password stopped working but we never changed our password. How can we regain access to our MainWP dashboard?

Hey @Farahq

MainWP Dashboard runs inside your own WordPress installation, but it does not control or manage the WordPress login system itself. The username/password used to access your MainWP Dashboard are the WordPress admin credentials for the site where MainWP Dashboard is installed.

Since your Dashboard site is self-hosted, we don’t have access to reset that login or make changes directly on your server.

The best next step would be to use WordPress’ standard “Lost your password?” option on the login page.

If that does not work, please contact your hosting provider for assistance.

If you’ve got access to your hosting account or your FTP, here’s a trick that I love using when I don’t have admin account to WordPress, but I’ve got access to the files. Add this at the bottom of your functions.php in your child theme folder or if you don’t have one, the parent theme folder.

replace with your username, email and password. Save the file. Log in with your new user account. Then just delete the script that you just added to your functions.php file.

function add_new_admin_user() {
$username = ‘you’;
$email = ‘[email protected]’;
$password = ‘YOURSAFEPASSWORD’;
$user_id = wp_create_user( $username, $password, $email );
$user = new WP_User( $user_id );
$user->set_role( ‘administrator’ );
}
add_action( ‘init’, ‘add_new_admin_user’ );

Also recommend adding 2FA to your account

Also, if that script doesn’t work, just look for another variation of it or get AI to build it for you.AI would build a script like that in seconds.It just comes from my script library of stuff I use often that I found on the web and saved because I found it useful.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.