Create a new WordPress admin user via PHP script
With this practical script, a new WordPress admin user can easily be created in the database.
The email address is always "no-reply(at)example.com" - this can be adjusted later in user management if the user should remain and is not only meant to be temporary.
Adjustments to the downloaded PHP script are of course also possible.
Instructions - Create WordPress admin user in database
- Generate script with the desired data.
- Download the script (a random number from 1-99 is appended to the file name).
- Upload the script to the web space into the WordPress root directory (where the wp-config.php is also located).
This can be done via the File Manager in the hosting panel or via (s)FTP. - Run the script by opening it in the browser:
https: //example.com/createuser-xx.php - The user has been created in the database and the script has been automatically deleted from the server again.
- Details
- Last Updated: 05 March 2021
