Steps to create an admin user account without access to a site:
- Login to the cPanel server for the type of site you need to add a user for, e.g. B&B/HiL, VR, for Demo.
- If adding a user to a site on the B&B/HiL or VR servers select the site account from the drop down in the upper right. If adding a user to a demo account skip this step.
- Select the “phpMyAdmin” menu item.
- Select the database that corresponds to the site you are adding to and then select the `wp_users` table inside of the database.
- Check that a user with the desired username doesn’t already exist. If it does either remove it or use a different username for your account depending on whether the existing account is needed.
- Select the “SQL” tab at the top of the page (should be the third tab from the left).
- Click inside the editor box and clear out any existing content.
- Paste the following code into the text area:
SET @UserName = 'USERNAME_HERE'; SET @UserEmail = 'EMAIL_HERE'; SET @UserPass = 'PASSWORD HERE'; SET @RegTime = NOW(); INSERT INTO `wp_users` (`user_login`, `user_pass`, `user_nicename`, `user_email`, `user_status`, `display_name`, `user_registered`) VALUES (@UserName, MD5(@UserPass), @UserName, @UserEmail, '0', @UserName, @RegTime); INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, (Select max(id) FROM wp_users), 'rich_editing', 'true'); INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, (Select max(id) FROM wp_users), 'syntax_highlighting', 'true'); INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, (Select max(id) FROM wp_users), 'nickname', @UserName); INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, (Select max(id) FROM wp_users), 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}'); INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, (Select max(id) FROM wp_users), 'wp_user_level', '10');
- Update the
@UserName
,@UserEmail
, and@UserPass
with the appropriate values. Make sure to keep the quotation marks surrounding the value. - Record the user name and password values in your password manager for later user.
- Press the “Go” button at the bottom right.
You should now be able to go to the login page with either DOMAIN/wp-login.php
or DOMAIN/wp-admin
and use the credentials you set up to login.