Modifying Your Name In The WordPress Comments

This info applies for the registered users in WordPress.
WordPress includes an option in the user management panel, with which an author can define what name is displayed when publishing posts or writing comments on the blog. Although changing the displayed name has an immediate effect on the posts, the displayed author’s name for the comments does not change. This is because the comment author name is stored as is in the wp_comments table in the WP database. No database relation is used for this piece of information.

So, if you change the name that is displayed around your blog, you would probably want to change this name on the comments you have posted so far as well. In order to achieve this, you will need access to the wordpress database. Provided that the credentials to connect are available, you can change the comment author name by issuing the following command on the console:

# mysql -u mysql_username -p -D wordpress \
-e "UPDATE wp_comments SET comment_author = 'NEW_NAME' WHERE comment_author = 'OLD_NAME';"

Probably you will need to substitute mysql_username and wordpress with the username of your MySQL user account and the WordPress’ database name respectively.

You will be asked for your MySQL password.

This will replace the old comment author name with new one. Messing with the wordpress database directly is not recommended, but manual editing is the only way to go in this case. Just make sure you have backed up your database before messing with it.

Modifying Your Name In The WordPress Comments by George Notaras is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Copyright © 2006 - Some Rights Reserved

George Notaras avatar

About George Notaras

George Notaras is the editor of the G-Loaded Journal, a technical blog about Free and Open-Source Software. George, among other things, is an enthusiast self-taught GNU/Linux system administrator. He has created this web site to share the IT knowledge and experience he has gained over the years with other people. George primarily uses CentOS and Fedora. He has also developed some open-source software projects in his spare time.