Create Admin User via FTP
When you are locked out of your WordPress site and have no access to PHPMyAdmin, add this to your functions.php file to create a new admin user account.
Remove it from the functions file after you’re successfully logged in. (The user will remain.)
Thanks for the snippet, WPBeginner!