So, you are locked out of your WordPress and you need in? Maybe the password reset function won’t work for you, because you don’t have access to the email anymore or you’ve instituted some security protocol that won’t allow a reset for an admin’s passwords or whatever.
I don’t know you. I don’t know your pain.
Whatever the situation, you need in. While I do have a tutorial here on adding an admin user to WordPress through the database, there is a much quicker and easier way.
Specifically, if you have FTP access and you know the admin username–and please tell me it’s not “admin” because I might have to slap you–then you can use this emergency password reset script.
You just save the code as emergency.php, upload it to the root of your WP installation, and visit the url of the script to reset your admin password. Then, please DELETE the script. Because any hacker yahoo on the planet could be searching for this very script and do the same dang thing you just did.
The internet being what it is, where info sometimes disappears into the ethers, I’m copying the code for you here.
If you fail to delete the script when you’re done, you’re totally on you own, man. Hope that helps and happy blogging!