Assign all posts from one user to another

This simple query allows you to transfer all posts from one user to another.

SQL query

This will assign all posts from author ID=14 to the user with ID=1 (admin).

UPDATE wp_posts SET post_author = '1' WHERE post_author = '14';

WP-CLI

wp user delete [email protected] --reassign=1

This will remove the user [email protected] and assign all his posts to user with ID=1 (admin).

Was this post helpful?

Leave a Comment