Lets say, you posted 5 posts and 3 comments with user admin with the same user. Your email address for this user was firstname.lastname@example.org. Now you read the WordPress admin security article here and decided that you should delete the admin user.
- Create another administrator in the admin area.
- Log out of the back end.
- Log in as the new user.
- Delete the old admin from the user list.
A second user gives greater security: that name will be displayed in all future published articles and commentaries, and the name of the actual administrator will never be displayed on blog pages and therefore never communicated to the outside world.
When you’ve done it, everything seems to be fine. Except your avatar is not showing up in the comments you made. Changing the email address of the new user won’t work. Now you have to do a bit of manual work.
In order to solve this issue, you will have to connect to your database. You can use phpMyAdmin for it. Go to phpMyAdmin, select your WordPress database and click on the SQL Tab
At this stage you should know two variables,
- Your table Prefix
You can find the table prefix in wp-congfig.php, search for $table_prefix = ‘XXX_’, and copy its value (XXX_ without quotes).
- User ID of your newly created admin user
If that was the second user you added, it must be a 2, but if you are not sure, enter the following query in the Text box right under SQL tab, as shown in above image.
select ID from XXX_users where user_login = 'YOURNEWUSERNAMEHERE'
Replace the XXX_ with your Table prefix and click the GO button, right under the text box. This will get you a table on next page like in the image below
Copy the number marked with red circle, and now you have your new user’s ID. Lets proceed with fixing the avater part. Go back to previous page on your browser and enter the following SQL in the text box,
update XXX_comments set user_id = Y where user_id = 1
Replace the Y with the ID you got in the last step and press the GO button. This should fix the problem you were having. Feel free to post in comments any questions you may have.