Support » Fixing WordPress » How can I move user comments to a different post?

  • Resolved peterdouglas


    Hello, my first new user posted a comment, but to the WRONG post…

    I’ve searched and found two possible methods:

    1. Using phpMyAdmin (I got about half way and then got totally lost and frustrated, as I’m not a very strong programmer)

    2. Using a plugin by Angsuman for moving posts and comments. Sounded great. Installed just fine, but it seems to work only for transferring the entire post, not an individual comment.

    Anyone have experience moving a single comment from one post to another?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Samuel Wood (Otto)

    (@otto42) Admin

    There is no way in the interface. A plugin might add it, but I’ve not used one that does.

    Using phpMyAdmin, browse the wp_comments table. Every comment will have a “comment_post_ID” number associated with it. Change that to the number of the post that the comment belongs to. Done and done. You don’t have to be a programmer, just able to look at the tables and edit them. If you can use a spreadsheet, you can use phpMyAdmin.

    Sounds easy enough. Is “comment_post_id” the exact wording? I went into wp_posts and then “browse” but cannot see the ID numbers.

    Got it! I took a look at it again and got it to work. Pretty easy, really, thanks!

    Just noticed though, it still says “1 comment” under the post where the comment was originally left. It said “0 comments” under the post where I moved the comment to, until I posted a comment, then it jumped to “2 comments” which is accurate.

    Will it still count the comment under the post it was originally left at?

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    The count won’t get updated until another comment is made or deleted or something for that post.

    OK, thanks for the info, it makes sense why it’s like that now. Thanks for the tips on moving the comment. It was actually quite easy in phpMyAdmin.

    If you want to update the comment count immediately after you make the change, you can just <Edit> one of the comments under each post, and the database will correctly reset the comment counts.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How can I move user comments to a different post?’ is closed to new replies.