How to move comments in WordPress
Since people commented about my cat page on my first introductory post, I created a post about a cat page and figured out how to move the cat page comments from my first post to the new cat page post.
For those wanting to know how to move a comment from one entry in WordPress to another entry, here is how to do it.
These instructions work for version 2.3.3 of WordPress. Depending on how much WordPress has changed over the years, this method may or may not work on different versions. You can find out which version of WordPress you have by looking in the footer at the bottom of your admin interface.
First you need access to your WordPress MySQL database. The easiest way is to use MySQL’s web interface, phpMyAdmin. To get to phpMyAdmin, enter your database hostname into the URL field of your browser and press enter. If you happen to be using Dreamhost as your webhost, you can login to their control panel, click “Goodies” from the left side bar, click”Manage MySQL”, locate your WordPress database, and click the phpMyAdmin link under the “Web Administrator” column associated with your WordPress database. You will need to login to phpMyAdmin to access your database. The database username and password you entered when setting up WordPress should work.
If you forgot your WordPress hostname, database username, or database password, you can find them at the top of the file “wp-config.php” in your WordPress directory.
- Once you’re in phpMyAdmin, select your WordPress database from the database drop down menu on the left.
- Enter the post table by clicking the link from the left which ends in “_posts”.
- Click the “Browse” tab at the top of the page that loaded to view the table with all your posts.
- Locate the post you want the comment moved to and take note of the number in the “ID” column associated with that post.
- Click the edit icon (looks like a pencil) associated with the post you just found.
- Scroll down to the bottom and find the field labeled “comment_count”.
- Increase the number in the field by how many comments you will be moving to that post. For example, if the comment count of that field is “5″ and you will be moving two comments to that post, then change the comment count to “7″.
- Click the “Go” button at the bottom of the page to save your changes.
- Now locate the table entry for the post you are removing the comment from.
- Click the edit button associated with that post.
- Decrease the number in the “comment_count” field by the number of comments you are removing from that post.
- Click the “Go” button at the bottom of the page to save your changes.
- Now click the link that ends in “_comments” from the list of database tables on the left.
- Click “Browse” to bring up the table holding all your comments.
- Locate the comment you want to move.
- Click the edit icon associated with that comment.
- Find the “comment_post_ID” field and change the value in that field with the post ID of the comments new home which I told you to take note of earlier.
- Click the “Go” button at the bottom of the page to save your changes and you’re done.
Sgreer:
Post of the cat photo 1088 is offensive. It shows a cat in a washing machine. I was subscribing to funny cat photos, now I will no longer. Please remove that photo before you lose more animal lovers.
20 September 2009, 2:42 pm