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

Enabling Secure FTP for User via SSH

Enabling Secure FTP for user via Command Line (from Hostgator forums):

chsh -s /usr/libexec/openssh/sftp-server <username>

Share Button

Putty: Setting up SSH Keys to New Server

When setting up a new server, you’ll want to set up your SSH Keys so you can remotely access without having to type in root password. Info for using putty, the simple, lightweight, open source SSH client.

Download Putty and the keygen tool here | Instructions for generating keys here

  1. Use Putty Keygen to create a public/private key pair and save locally. Make sure you use RSA keys, SSH2, and DO save a passphrase.
  2. Log into WHM -> Security -> Manage SSH Keys -> Import Key
  3. Paste Public and Private Key Pair into boxes provided. Add your pass-phrase and import.
  4. Make sure putty is set to use your private key, and connect to your server. (See image below)
  5. Log in as Root and use passphrase, which will be required to log in.
putty add keys
Browse to your private key & save this connection
Share Button