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.
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>;
- 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
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>;
- <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
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.
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.
With this comment you must select the source and destination and press the move comments button.
Any thing else? please suggest it in the comment section, thank for your contribution.
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.
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.