Tips and Tricks Latest Post |
Create a WordPress Admin User for A WordPress Site via MySQL (PHPMyAdmin) Posted: 10 Dec 2013 06:43 PM PST One of our users site got hacked and the WP Admin user account password was changed by the hacker. This essentially locked the user out of his admin dashboard. It is best (for situations like this) to just create a new admin user account to gain access to WP admin dashboard and fix things as needed. In this tutorial I will show you how you can create a new WordPress admin user account via MySQL database (without having access to your WordPress admin dashboard). Step 1) Access Your MySQL Database
Step 2) Go to the WP Users table
Step 3) Insert a New Record in the Users TableYou will need to fill in the following fields to insert a new user record:
You can go back to the wp_users table and browser the entries to verify that the user record has been inserted correctly (see screenshot below). Take note of the value if the “ID” field for this newly created user (we will need this ID field’s value for the next step). In this case the ID is 2. Step 4) Insert User Meta ValuesThis is the final step where we will assign some user meta values to the user account we just created. Go to the “wp_usermeta” table and click on the “insert” link: Use the following values and click the “Go” button to insert the usermeta data
a:1:{s:13:"administrator";s:1:"1";} See screenshot below All done! You can now log into your WP site using this newly created WP User account. You can use this account to change the password of your other user accounts or delete them (if you want to). |
You are subscribed to email updates from Tips and Tricks HQ To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |