UPDATE wp_users SET user_pass =md5('newpassword') WHERE user_login = 'yourusername');
UPDATE myprefix_users SET user_pass =md5('newpassword') WHERE user_login = 'yourusername');
UPDATE wp_users SET user_login = 'NewName' WHERE user_login = 'Admin';
UPDATE myprefix_users SET user_login = 'NewName' WHERE user_login = 'Admin';
POPULAR WORDPRESS SQL SCRIPTS: USER ADMINISTRATION
FEBRUARY 15, 2014 BY 2 COMMENTS
Here are some of the most common WordPress SQL user administration scripts that I run.
Backup! Backup! Backup!
First and foremost, before manipulating the database, ALWAYS back it up!
I am going to assume that you have access via a WordPress SQL Plugin or phpMyAdmin.
Remember, if you are like me and change the prefix, be sure to change the wp_ prefixes below to whatever your prefix is. I have added myprefix_ to help demonstrate where this change would be.
Change Default Administrator Name
12 |
|
Reset User Password
12 |
|
Delete Orphaned User Meta
12 |
|
Replace User Meta
12 |
|
Add New Admin User
In the example below, I am using an ID of 2. Change this number to the next user available, or some safe high number.
1234567 |
|
Delete Unknown Users
This will delete users not found in comments or as an author of a post. Do not use this script for community sites or sites with Subscribers.
1234567 |
|
Get All Admins
123 |
|
No comments:
Post a Comment