How to Import WordPress Comments
To import WordPress comments, go to All Import › New Import, provide your import file, and map the incoming data elements to the relevant WordPress comment fields. Run the import, then verify that the new data is correct.
Step 1: Import WordPress Comments – Create New Import
Navigate to All Import › New Import on your site, provide your import file (upload, download, or select it), then choose Comments from the dropdown list:
Click Continue to Step 2.
Step 2: Review the Comments to Import
The Review Import File screen appears next. Here, check that your import file and data are correct:
Near the bottom, you can use the Manage Filtering Options section to apply filters to the import data, which you to narrow down which comments to import.
Click Continue to Step 3.
Step 3: Map the WordPress Comments Data
Next, you will see the Drag & Drop screen, which allows you to map the data elements from your import file to their corresponding Comments target fields. To do so, drag the import elements from the right side of the screen to their target fields on the left.
First, map the Comment itself, then the Parent Post it's attached to (with post ID, slug, or post title), then the Comment Date:
The Advanced Options section lets you define Approval Status, Comment Type, Karma, and Parent Comment (matched by comment ID or date/time of parent in GMT time).
This section lets you map the Author Name and Author Email:
There are additional advanced options in this section that let you map the Author User ID, Author IP, Author URL, and Comment Agent:
This section lets you add custom fields or meta to your comments:
Below, you may see other sections depending on your installed add-ons, and also the Function Editor at the end.
Click Continue to Step 4.
Step 4: Configure the Settings and Run the Comments Import
You now see the Import Settings screen, where you can define key import settings. To start, click Auto-detect to generate a unique identifier for the imported comments. This allows our software to identify duplicates and properly apply updates.
Below this, you'll see the Scheduling Options and Configure Advanced Settings sections. These can be left with their default selections for this example.
Click Continue at the bottom to move to the next step.
This brings you to the Confirm & Run interface, where you can review an import summary explaining what will happen. Click on Confirm & Run Import to proceed.
Once the import completes, you'll see this screen:
Check and view the comments after you import the WordPress comments.
Import WordPress Comments – Advanced Topics
Comment Skipped Due to Post Match Not Found
If a comment is skipped because no post parent is found, you'll see a message like this in the History Logs:
[01:44:36] SKIPPED: Comment post not found by id `Hello world!`
To solve this, you need to check that there's a valid post matching the post ID, title, or slug that you're using. Comments can only be imported when they have a matching post.
Learn more about importing WordPress posts here: How to Import WordPress Posts.
Use Filters to Select What Comments to Import
You can filter the comments to import during Step 2 or when editing the existing import template under Manage Filtering Options. To create a filter, you need to specify an Element, a Rule, and a Value.
In this screenshot, we've created a rule that will only import comments where the parent post ID has a value equal to 8.
To change a filter for an existing import, locate that import in All Import › Manage Imports, go to Edit Template, and modify the filters in Manage Filtering Options.
You can learn more here: Filtering with XPath.
Import WordPress Comments – Frequently Asked Questions
How Do I Export All Comments from WordPress?
- Navigate to All Export › New Export.
- Choose Comments as the Specific Post Type.
- Build the export columns by dragging fields from the Available Data section in the Drag & Drop screen.
- Click Continue and then Confirm & Run Export.
- Download the exported file using Click to Download.
How Do I Bulk Edit My Existing Comments?
- Using WP All Export, create an export for all existing comments.
- Download the exported comments.
- Edit them in your desired spreadsheet software.
- Go to All Export › Manage Exports and use Import with WP All Import.
- Load the edited file and run the import.
This requires you to have both WP All Import and WP All Export. Learn more about bulk editing data here: How to Bulk Edit WooCommerce and WordPress Data.
How Do I Migrate Comments From One Site to Another?
- In WP All Export, create an export with all desired comments.
- Download the bundle file for the exported comments.
- In WP All Import, go to All Import › New Import and upload the bundle file
- Run the import and review the migrated comments afterward.
For this to work, the posts should match by title, as that's what is used in the bundle file. Learn more about this process here: How to Migrate WooCommerce and WordPress Data.
Import WordPress Comments – Related Docs
Learn how to import any file into WordPress using WP All Import.
Step-by-step instructions on how to import WordPress posts.
Learn how to use PHP code during your import to modify data on-the-fly.