WordPress Change Ownership of Posts

To transfer posts under author A to merge with those under author B, use the below SQL query.

You will first need to obtain the author ID of both authors by going to “Users” (in WordPress admin) panel. On the far right side, authors have the numberof posts listed beside their names (under the “Posts” column). Hover over that number of posts for the author and view the URL string displaying at the bottom of the browser. Withing that string, you will see something like “author=1” or “author=23”, and so on. Those are user the “user_id”. Make not of the ones you want to manage.

The MySQL syntax is:

UPDATE wp_posts SET post_author = 'new-id' WHERE post_author = 'old-id';

If (for example) author A’s ID is 15 and author B’s ID is 26; and you require author B to be the new owner of author A’s posts, you would issue the following command (example):

UPDATE wp_posts SET post_author = '26' WHERE post_author = '15';

Leave a comment