You can check the user credentials in phpmyadmin by looking in the _usermeta table for a the meta_key column entry called wp_capabilities. Since you only have one user it will be the only entry. If you have more than one user, I’d guess you’re the user with ID 1 so match wp_capabilities column with user_id column entry “1” and see if the meta_value shows administrator. It’s serialized data so it will likely look like this: a:1:{s:13:"administrator";b:1;}
.
If that is not the entry there, you can always replace the meta with the above line and try signing in. You should be admin at that point.
If you need to add a new user all together there are 2 easy ways to do this:
wp-CLI : wp user create newusername newuseremail --role=administrator --user_pass="newuserpass" --first_name=newuserfirst --last_name=newuserlast
Replace the newuser variables with your own info…
If you don’t have wp-CLI or are not sure how to use it, you can add this function to your theme’s functions.php and load the site once. It will create the user. Please make sure to remove this code after!!!
function rt_admin_account(){
$user=""; //put username here
$pass=""; //put pw here
$email=""; //put email here
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','rt_admin_account');
this creates a new user if that user doesn’t exist. If it doesn’t work change the username to something new and use a different email.