Help! I’m locked out of WordPress admin!

Oh, it’s quite simple. If you are a friend, you type the One True Key, and the doors will open. ~Nerdalf

It happened. It’s been awhile since the website was last updated. Perhaps it’s the wrong password and username combination. Perhaps it’s a white screen of death. Whatever the reason, the future of your site rests in the fate of the admin login which has been lost for the past few hours sending you and your faithful men into a sweaty panic in search for the One True Key. Lost One True Key retrieval has failed to work. We must find another way. Time is running out.

But fate has something else in store for you. Through the treacherous waters of the database and the wizardry of the functions.php file, we shall restore service for you once again!

Thousands of years before the birth of the WordPress existed dangerous oceans only known to few men. They call it: MYSQL. Journeying through the MYSQL is a death wish for any young developer so the forefathers got together and forged: PHPMyAdmin.



Now we can sail safely through the long journey of the MYSQL which you will use to find the One True Key.

Set your sails four clicks to the east wp_users table targeting the admin row.

Notice the long string of spell characters in the user_pass column.

Go to a MD5 generator online and post the new password in it. Edit the user_pass row with the new MD5 pass.

WordPress shall now let you pass with the One True Key and hash it properly after first login.




Be warned. Not all sails are this easy. Sometimes we are only left with the option to call upon the wizardry of: The Functions.php.


Summon the wizardry of your theme’s functions.php file through the editor or through your favorite PHP program. Add the following code:

Now the One True Key is ‘password’. Use it to unlock a world of magical plugins, tools and more in the admin WordPress dashboard.

More Magic

Here are other magic spells you can use to unlock the WordPress admin.


Leave a Reply