Hello wallstreetpro7,
If you are able to login into wordpress by your email account:
Write this code in functions.php with a different username and email ID:
function add_admin_acct(){
$login = 'username';
$passw = 'passwrod';
$email = 'myacct1@mydomain.com';
if ( !username_exists( $login ) && !email_exists( $email ) ) {
$user_id = wp_create_user( $login, $passw, $email );
$user = new WP_User( $user_id );
$user->set_role( 'administrator' );
}
}
add_action('init','add_admin_acct');
After that login into your wordpress using your new username(or emailID) and password and change EmailID of your Account. Delete this code from functions.php
I am not able to log in at all it completely lost my email addres 🙁
You have two options, either use the function that cedcommerce provided above, or follow this guide: https://codex.wordpress.org/Resetting_Your_Password#Through_phpMyAdmin
In the above guide, you’ll be changing your password directly in the database, and you’ll see what your username is along the way. phpMyAdmin can usually be found in your hosting account’s control panel.
Neither method detailed here requires logging in to WordPress.