Sometimes you may have lost access to WordPress admin, this cheeky hack will teach you how to create a WordPress user with administrator privileges using phpMyAdmin.
1. To begin, login in to your cPanel account and navigate to phpMyAdmin!
2. Select your websites database from the list on the left hand side of phpMyAdmin's web interface.
Note: If you don't know which database is your websites current database, please check your wp-config.php file and find the database name next to the entry DB_NAME.
3. Now select the table wp_users.
4. Select Copy next to a user table.
5. You will now receive an form to update the copied table columns, update the columns labelled user_login, user_nicename, user_email and display_name to your preferred WordPress username details and email address. Once you have completed your changes, please select Go.
6. Now we are going to assign your new user administrative privileges, to start, please reference the ID of the new user and keep the user ID on hand for the following steps.
7. Navigate to the usermeta database table.
8. Within the usermeta table, please find a row which has the meta_key labelled wp_capabilities and the meta_value as a:1:{s:13:"administrator";b:1;} and select Copy.
9. Now update the user_id column with the ID of your new WordPress user and select Go!
10. To set the password for the new user, you will need to navigate to /wp-admin and request a password reset, once that step is complete you will be able login and manage your website with your new WordPress administrator!
Comments
0 comments
Please sign in to leave a comment.