I created this script to enable me to quickly login into my client's WordPress site after they have completely fucked messed things up. This will allows me to immediately create a new user with any role and reset their details without having to fiddle with the database.
To use this script, you must have access to the web server itself (via FTP or SSH) because you need to upload this file and execute it through the browser.
Possible use cases:
- You lose access to the site or forgot the credentials.
- The site is somehow hacked / being taken over by someone.
- You wanted to create a new admin user on the fly.
-
Copy the
backdoor.phpfile from this repository and upload it into your WordPress root directory. The default directory should be inside thepublic_htmlfolder but if you install your WordPress site inside a sub-folder, then upload the file into the sub-folder accordingly. -
Execute the script through your browser at
https://yourdomain.com/backdoor.php. Replaceyourdomain.comwith your own domain name. -
If it executes successfully, you should be redirected to WordPress login page and you will be able to login with the newly created user account based on the credential that you just entered.
-
IMPORTANT: Finally, delete the
backdoor.phpfile. It's not a good idea to leave it inside the server because someone might exploit it.
DISCLAIMER: I assumes no responsibility or liability for any errors or omissions in the content of this repository. The information contained in this repository is provided on an "as is" basis with no guarantees of completeness, accuracy, usefulness or timeliness.