Need a WordPress Admin Password Reset?

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!

Share Button

Solving FTP Deletion Error “550 Prohibited file name”

Trying to delete a file via FTP and unable to? Getting a “550 Prohibited file name” error? Annoying! But also very easy to fix. Create a php file called “unlink.php” with this code, replacing the “YOUR-FILENAME-HERE” with–what else?–your undeleteable file name.

<?php unlink('YOUR-FILENAME-HERE');?>

Upload it to the directory with the file in question, and visit the script in your web browser. It will remove the previously unruly file. ((Thanks to irasmith’s forum post for this solution.))

PHP noobs, please remember to have NO blank spaces before or after the beginning of your code in PHP files, or you’re liable to get a “Cannot modify header information/Headers already sent” error. You can create the file in a text program and simply rename it with a .php extension.

Share Button