Moving posts or merging users

I recently installed a new version of Ghost (3.4.0) and imported a bunch of posts from backup. However, I now have a few different users (there used to be only one) and I was wondering if there was an easy way to merge them all into one user or transfer all posts to one user (there are hundreds of posts, so clicking through the UI one by one isn’t ideal).

  • What version of Ghost are you using?
    3.4.0

If you’re comfortable with a raw SQL query, you could find all the posts that you want reassigned in the posts table, find the user you want listed as the author of the articles in users table, then write a query to update those posts with the correct user.

Finally, delete the users that are not assigned to any posts. If you have posts with multiple authors you may need to also modify the records in posts_authors table.

If you’re not comfortable writing SQL queries, you could also use try using the Admin API to find all posts that you want modified, the user you want to assign to the posts, then update them accordingly. This might be a safer approach than modifying the database directly since it will probably update the join tables for you.