Forums

[resolved] How can I move user comments to a different post? (7 posts)

  1. peterdouglas
    Member
    Posted 2 years ago #

    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?

  2. Otto42
    Moderator
    Posted 2 years ago #

    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.

  3. peterdouglas
    Member
    Posted 2 years ago #

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

  4. peterdouglas
    Member
    Posted 2 years ago #

    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?

  5. Otto42
    Moderator
    Posted 2 years ago #

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

  6. peterdouglas
    Member
    Posted 2 years ago #

    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.

  7. brokenclaw
    Member
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic