The procedure is the same whatever GUI or command line access you got to the DB.
- In “wp_users” table, create a new user either via GUI or by INSERT SQL statement. Here is a sample with Cloudways GUI, but the same can be reproduced with any user interface. For Cloudways GUI, make sure that in “user_pass” you selected “md5” and put in the clean password. Note the record ID for the new user that was created for you. You will need it for the next step.
![](https://linuxel.com/wp-content/uploads/2025/01/image.png)
2. In “wp_admin”, create 2 new records
Record #1
user_id: <the id of the new user you created at step 1>
meta_key: wp_capabilities
meta_value: a:1:{s:13:”administrator”;b:1;}
Record #2
user_id: <the id of the new user you created at step 1>
meta_key: wp_user_level
meta_value: 10
With these 3 new DB records you should be able to access your WP as and admin user ‘abc” and password “HelloWorld!!!”.