• I’ve been the sole poster on an internal blog and now I want multiple people to act as Editors. I’ve published hundreds of items as an Admin and I want those Editors to be able to edit those posts and pages — but it seems they can’t b/c their role is lower than mine.

    Can I bulk reassign all my posts to another user profile? I know you can do that by deleting a user but this is my Admin account. And I know I can do it one-by-one but that would take a lot of time. And I’d hate to make all those editors Admins. The Role Manager plugin didn’t help in this case. Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You can just update the value of post_author (in wp_posts table) for each post with the person’s user id.

    With something like this:

    <?php
    include('wp-config.php');//include WP's wp-config file
    $userID = 2; //the user's ID
    $posts = array(10, 20, 22, 23);//array of post IDs that's going to be assigned to the author with the user ID set in the $userID variable
    for($i=0;$i<count($posts);$i++){
    	mysql_query("UPDATE wp_posts SET post_author = '".$userID."' WHERE ID='".$id."'");
    }
    ?>

    Backup your database first. This is not tested.

    Thread Starter keaggy

    (@keaggy)

    Thanks haochi! I appreciate the suggestion… am still wondering if there’s a more automated way.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Changing post author’ is closed to new replies.