Sometimes clients can’t provide you the correct WordPress login for a website – they didn’t set it up, the admin email goes to someone long gone, but if fortune is shining upon you, they know how to get into their hosting. And if it’s shining really bright, that hosting offers a cPanel with access to your file manager and databases.
This was the case with a client who had the admin user name correct, and had texted me the password. It has a zero, an ‘o’ and either an L or an I or an l or a 1, and it kept rejecting the password. I copied/pasted this really long password and emailed it to myself, copied it into the login, and it still didn’t work. Not wanting to get locked out, I tried my luck with the host access and got in.
I could see that the user name was correct for the current administrator, but the database obfuscates the password. I tried Greek Geek’s instruction on creating a new admin user by creating a new user in phpMyAdmin, then adding meta data for that user twice. It worked to add the account, but I had no admin access, just reader access. I couldn’t find the new information in user meta in the database! I tried a couple more times then gave up.
Looking back to my search results, I found another link: all you have to do is create a folder and a file. I created the folder in the file manager, created the file in CotEditor and changed the user name, email and password. Uploaded the file to the new folder. I went back to phpMyAdmin and deleted the user account I’d created for myself, so that I wouldn’t get any ‘this user already exists’ error. Then I went to log into the site, and it told me that my cookies weren’t enabled. So I tried it in an incognito window. It worked like a charm. The info is a few years old, but it worked in this instance.