Friday, December 11, 2009

How to move comments to another post in wordpress

Learning WordPress. sometimes we need to move the comments to other posts or articles in your wordpress blog. The reason is probably because it is more appropriate comment to put in another post. The condition most often by visitors is to give our comments on page article about us we are or may contact us page. Of course, this comment becomes less relevant and may cause confusion other readers.

For that I am trying to find a way to move comments to another post in the wordpress blog. According to an article I read there are 2 ways of manually manipulating the wordpress database and practical ways to use wordpress plugin.

How to manually move the comments to another post

This way I suggest to you who know SQL syntax syntax especially MySQL queries and understand how to access your database through phpMyAdmin or homemade script. The idea is to change the id post a comment on the data we want to move. Here we need to get the post id id old and new posts. Then we also need to get comment id.

After getting komentar_id and posting_id_baru, then run the following query:

UPDATE wp_comments SET posting_id_baru WHERE comment_post_ID = comment_ID = komentar_id;

Does finished up here? Not because wordpress maintain the number of comments on posts automatically written when a new comment. For that we need to manipulate a table of old and new posts. Sintaknya following:
UPDATE wp_posts SET comment_count = comment_count +1 WHERE ID = posting_id_baru;
UPDATE wp_posts SET comment_count, comment_count = 1 WHERE ID = posting_id_lama;
Not complicated enough and this is very dangerous in my opinion done by people who do not understand the system wordpress. Syntax above I run the wordpress version 2.5.1, for other versions you need to adjust the structure of the database version.

Source: http://www.g-loaded.eu/2007/11/06/move-comments-to-another-post-in-wordpress/

How to move comments to another post using plugins

This way more I recommend because it's easier done by anyone and certainly more secure. As usual wordpress plugin designed for manipulating wordpress work. And to move comments to another post there was already providing this plugin. There are at least 2 plugins that can be used in this case, namely:
  1. Wordpress Move Comments: download the plugin folder and then upload to your wordpress blog wp-content/plugins. Then switch on the control panel. After that search Manage menu> Move Comments. In this view you choose the comments which will be moved, and then select the goal post, then click the Submit Query button.
  2. BPD Move comment plugin: download the plugin, upload to wp-content/plugins. Then switch. after the search menu Comments> Move Comments. Select comments will be removed, and then press Bulk Move Checked Comments. After that select posts destination, then press the Move It.
From 2 plugin, I prefer the BPD Move comment plugin for comment list using the navigation page, so if we have thousands of comments do not need to load the entire comment. However, this choice is up to you, its core is a way to move comments to another post in wordpress. Good luck!

No comments:

Post a Comment