4 Ways to Move WordPress Comments

August 22, 2011 · 16 comments

by Jennifer R

wpcomments

Up to version 2.9.2 WordPress didn’t has any function that allow us to move some comments from one post to another. This situation sometimes happen when your visitors comment on the wrong article or you want to move anything from the old post the the newer one. In this article, I want to show you some ways to do that and hope you will find it useful. Remember that it is the themes that control how comments look and in most cases threaded comments are best on sites with heavy dialogue. I’ll recommend that simple wordpress themes from premium vendors are used but OK some free themes also have good comments implementations.


ElegantThemes
ThemeForest

Advertisement

Update the WordPress Database using SQL

Let’s assume you have two posts, one New and one Old and you want to move all of the comments from the Old to the New one.
First, you need to know the ID of your New and Old posts, it’s so easy and I think you can do this without any help (post ids can be found in the url when editing a post ex. wp-admin/post.php?action=edit&post=69173.
Second, you must logged in your phpmyAdmin of your website control panel (or any program that allow you to run a SQL query against your database) and run one of the queries below (Executing SQL against the database is risky if you are not sure exactly what you are doing. Take care and consider testing on a test WordPress first):
For moving all of the comments:

UPDATE wp_comments SET comment_post_ID=<New post ID> WHERE comment_post_ID=<Old post ID>;

For moving all comments of the specific author:

UPDATE wp_comments SET comment_post_ID=<New post ID> WHERE comment_post_ID=<Old post ID> AND comment_author_email=<comment author email>;

Notes:

  • wp_comments may be different in your database, it depends on your database prefix
  • <New post ID>: an ID of your New post
  • <Old post ID>: an ID of your Old post
  • <comment author email>: the email of Author who you need to move his/her comments

Third:

Your comments are now moved to the New post but you need to update the comment count of each post for WordPress (WordPress will not automatically fixed it for you) by running this query:

UPDATE wp_posts SET comment_count=<total comments of new post> WHERE ID=<New post ID>;
UPDATE wp_posts SET comment_count=<total comments of old post> WHERE ID=<Old post ID>;

Notes:

  • <total comments of new post>: Total comment of your New post after moving comment
  • <total comments of old post>: Total comment of your Old post after moving comment

Using WordPress Plugin

Move WordPress Comments

This plugin adds a small form to every comment on your blog. The form is only added for admins and allows you to move comments to a different page and to fix comment threading.

Move Comments

The plugin adds a sub-page under ‘Comments’ where you can filter comments by post or page title, tick the ones you want to move and finally select where to move them to.

 

Simple Move Comments

With this comment you must select the source and destination and press the move comments button.

image

Any thing else? please suggest it in the comment section, thank for your contribution.

Conclusion:

No matter what your choice is, using SQL against the Database or WordPress plugins will help you to solve the problem. If you know SQL well you can control quite well what you’re doing – but keep in mind that you must backup your database before you press the execute button! WordPress plugins can be easy to operate but in some case the functionality you need may not be implemented. Give it a try.

Resources

If you are looking for new appearance on your website there’s a lot of nice wordpress themes available. These articles will help you get inspiration: 33+ Top WordPress Themes and restaurant menu templates – also have a look at this article: showing you a great marketplace called Themeforst – (custom wordpress themes).

You can also take a look at this article showcasing 60 best wordpress themes.

Author : Jennifer R

Jennifer R is a banking student who love to work with Php, WordPress blog and Css design… She is the chief editor of Intenseblog website.
Want to keep up with her? Follow Jennifer R on Twitter!

{ 10 comments… read them below or add one }

Arie October 8, 2012 at 7:22 pm

I can’t find any plugin to create a NEW post from a comment. Surprising that no-one has done this so far, or maybe I just didn’t find it yet!

Reply

Ronny Roger November 3, 2011 at 3:16 pm

Any Plugin working with Wordpress 3+?

Reply

Shaina Tim September 28, 2011 at 12:51 pm

Hello, thank you for posting it. But I have 1 question and hope you don’t mind. Is there any other way to update WordPress database?

Reply

Franck Melka April 30, 2011 at 1:44 pm

Hi, have a good week-end.

Just one question, i start a new site using rapid weaver ( MAC OSX Snow Leopard ), i should want to use wordpress and to link the “CMS comments” of wordpress to work with my blog ( only php ).
The princip is simple, i do’nt want to use Disqus whitch is a great way to add comments on a site or blog, beacause i want to know my futur subscribers.

With Wordpress it’s easy, there is a plug’in, and i maid my applications on twitter,facebook,and windows live.

How to do it?

Reply

RK September 7, 2010 at 4:57 am

really cool info – my site was just hacked by some fundamentalists and I was worried. Looking all over the web for detailed instructions on every aspect – back up and restore option.Thanks for sharing – Prevention is better than cure !

Reply

hermes handbags July 9, 2010 at 11:24 am

If you really want to move it – then post the same comment yourself and then edit the name, site, etc. to the other commenter’s info and after reading your post i ve leanned about moving the comments in the wordpress.

Reply

play bingo games online June 15, 2010 at 11:59 am

In this situation sometimes happen when the visitors comment on the wrong article and we have to move anything from the old post the the newer one.

Reply

real money slots June 11, 2010 at 12:15 pm

If you really want to move it – then post the same comment yourself and then edit the name, site, etc. to the other commenter’s info and after reading your post i ve leanned about moving the comments in the wordpress.

Reply

real money slots June 11, 2010 at 9:19 am

The SQL well you can control quite well what you’re doing and then keep in mind that we have to take backup your database before you press the execute button.

Reply

Laira June 4, 2010 at 10:24 pm

The posting is very excellent so Great Thanks for sharing with us….

Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

{ 6 trackbacks }

Previous post:

Next post:


Web Analytics