Change Author Name of Several Wordpress Posts

jootess

Regular Member
Joined
Feb 17, 2022
Messages
240
Reaction score
27
Hello
I have 2000 wordpress posts totally.
I want to change name of author for posts between 500-1500 to "JOHN" with mysql database command.
What command should I use?
 
I don't the mysql command. But you cwn use wp sheet editor plugin to get the same result.
 
It's probably easier to use one of those free guest author plugins. That way you can change it based on the author post based on how you set up your categories. I think that's how I did it.
 
To change from one author to another there's this (replace id_new_author and id_old_author with their author IDs)

SQL:
## to get the list of authors + their ID's

SELECT ID, display_name FROM wp_users;

## to replace one author with another
UPDATE wp_posts SET post_author=id_new_author WHERE post_author=id_old_author;
 
Back
Top