WordPress – How to Migrate Comments from a Site to Another

Hi there. In this post, we’ll show you how to easily migrate post comments from a WordPress site to another.

It’s really useful when you clone your live site to make changes on a local or a staging site. And something great is that we’ll show you how to migrate a specific post type’s comments. For example, the post comments only, or the event comments only.

For this, we’ll use the WP Sheet Editor – Comments and Reviews plugin, which allows you to manage comments and reviews on an intuitive spreadsheet. You can manage comments and reviews for all post types: post comments, product reviews, event or course reviews, etc.

Once you install and activate the plugin, you need to follow these simple steps to export comments from one site and migrate or import them to another site.

1- Make sure you have the posts on both sites

IMPORTANT. Before importing comments, you must have imported or created the posts on the target site so that when importing comments we can connect them to the correct posts.

You can learn how to migrate WordPress posts from a site to another by reading this tutorial.

As you can see, we have two sites for this example: Live Site (Source) and Local Site (Target).

Posts on the Live Site (Source):

wordpress migrate comments from a site to another

Posts on the Local Site (Target):

wordpress migrate comments from a site to another

However, the post comments are not on both sites, so we’ll export them from the Live Site and import them into the Local Site.

Comments on the source site:

wordpress migrate comments from a site to another

No comments on the target site:

wordpress migrate comments from a site to another

2- Export the post comments from the source site

WP Sheet Editor allows you to filter comments by post type. For example, you can filter post comments, WooCommerce product reviews, or event or course reviews.

Option 1: Export all post comments

You can open the advanced search tool with a click on “Search” in the toolbar.

wordpress search post comments

Now you need to select the following values to filter the post comments:

  • Post type: Posts (posts)
  • Click Run Search.

wordpress search post comments

Option 2: Export new post comments only

If you’ve previously migrated comments to the second site, you can export new comments added since the last date you exported the comments.

For example, if you imported all comments today, in 1 week there may be 30 new comments.

If you want to make a new import to update the testing site, you must search comments by date in the live site to export and import the new comments in testing.

Since the comments have no title or slug to identify, we need to use the date as a search parameter.

Select these values in the search tool:

  • Post type: Posts (post)
  • Click Enable advanced filters
  • Field: Date (comment_date)
  • Operator: >
  • Value: Enter the date you exported the post comments the last time.
  • Click Run Search.

wordpress-migrate-comments

Once your post comments have been filtered and displayed on the spreadsheet, you need to click Export on the top toolbar to download the post comments to a CSV file.

wordpress-migrate-comments

Select the following values to configure the export:

  • What columns do you want to export: Click Select all
  • Which rows do you want to export: All the rows from my current search
  • What app will you use to edit this file (optional): Select any of the available apps.
  • Name of this export (optional): You can give this export a name for future exports.
  • Click Start new export to download the post comments to a CSV file.

wordpress export post comments

This is how the post comments look once they’re exported to a CSV file.

Something important to notice is that our plugin will automatically fill the Source Site ID column to match the comments with the posts on the target site.

wordpress export post comments

3- Import the post comments on the target site

Once you are ready to import the post comments to the target site, you must open the comment sheet on that site and open the “Import” tool with a click on the top toolbar.

wordpress import post comments

Now you must select these values to upload the CSV you exported from the source site to the target site:

  • Source: CSV file from my computer
  • Click Select File and choose the file from your computer.
  • Click Next.

wordpress import post comments

It is likely that you will see some columns that the plugin will suggest you map with columns in the target site. You should select Ignore this column on the following fields:

  • Parent comment
  • User ID of the Author
  • Post ID
  • Post Title
  • Ver Post

You can map other columns, but ignore these.

Once done, click Next.

wordpress import post comments

Now you must select the following values to configure how post comments will be imported:

  • Do you want to update or create items: Here you have several options that are important to consider:
    • Create new items and update existing items: Use this option to import new comments and update existing comments. In this case, you need to match the existing comments using the DATE field both in the CSV Field and the WordPress Field.
    • Only create new items, ignore existing items: Use this option to only import the missing comments and ignore the existing ones.
    • Import all rows as new: Use this option if you want to create comments only.
    • Update existing items, ignore new items: Use this option if you want to only update existing comments and ignore (not import) new comments. In this case, you need to match the existing comments using the DATE field both in the CSV Field and the WordPress Field.
  • Click Next.

    wordpress-migrate-comments

    Finally, you’ll be shown a preview of how the post comments will look imported.

    If everything looks fine, you need to click The preview is fine, start import to complete the import process.

    wordpress import post comments

    As you see, the post comments have been imported correctly on the target site.

    wordpress migrate comments from a site to another

    Migrating comments from one site to another is easy!

    This is a very easy way to migrate comments or reviews of posts, products, events, or any other type of post from one WordPress site to another.

    Remember that you need to import the posts/products/events before importing the comments or reviews.

    Do you need help?

    You can receive instant help in the live chat during business hours, or you can contact us and we will help you via email.