[resolved] How to Re-associate comments with a user after moving wordpress (3 posts)

  1. Griff
    Posted 3 years ago #

    Hey there,

    I've decided to do a ground up rebuild of my blog. I've created a fresh database, fresh install of wordpress, etc. I used the export tool on my old blog site to bring over the posts, and imported them to my new site.

    Everything added correctly, however my comments don't appear to be associated with my user account. (My little picture isn't on the comments, but on my posts.)

    How can I re-assign my comments to my user profile? Something tells me the answer lies in doing some SQL commands in my database, but I'm kind of a noob with mySQL, so I'd appreciate a hand.

    Thank you :)

  2. Griff
    Posted 3 years ago #

    Update: I've been working on this and I've gotten further, but I need some mySQL help.

    In the wp_users section, my Author account's user id is 2. In the wp_comments, my author's user id is 1 (which I believe is actually my admin account's id.)

    So if this is all making sense, how do I change a user id in the wp_comments table?

    Thanks :)

  3. Griff
    Posted 3 years ago #

    I hate to keep posting in a row, but for anyone in the future who has this problem, I've found the solution.

    If you are using phpmyadmin with your database, go to the SQL section and run this:

    UPDATE wp_comments
    SET user_id = 2
    WHERE name = "Jimmy the Author"

    *where you see 2, change to whatever your author's user id is.

    Happy blogging :)

Topic Closed

This topic has been closed to new replies.

About this Topic