Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
My wordPress database was hacked and all users_names were changed to the same thing. I'd like to write a mySql query to replace all usernames that = "x" to the user_nicename. I'm unsure how to do this - any suggestions?
This should be working:
Be sure that your DB prefix is "wp_"
Update wp_users set wp_users.user_login=wp_users.user_nicename where wp_users.user_login="x"
To update the Nickname use:
UPDATE wp_users SET user_nicename = 'new_nick_name' WHERE user_nicename = 'x';
Required, but never shown