Back to blog
4 min read Content Sync

Pull Approved Comments from Live to Staging (Without Spam or Pending)

While you work on staging, visitors keep commenting on live. When you later push a post from staging, or test a new comment layout, staging should have those comments too, but only the real ones: approved comments and their replies, not the spam and not the pending questions that live moderators haven’t answered yet. With Import Export by RockStarLab, you browse the live site’s comments from staging, pick the approved ones and pull them into the matching post, with their dates and reply threads.

Free: comment sync for posts and pages is in the free plugin. The test below used version 2.2.13 on both sites.

Short Answer

On staging, open Comments, click Sync, choose the live site and click Browse remote comments. Filter by the post, tick the approved comments (pending ones are labeled Pending), let Automap choose the staging post and click Pull selected comments. The comments arrive approved, with their original dates and reply structure. Spam isn’t listed, and pulling the same comments again updates them instead of adding copies.

The comments on live

On live, the post Winter Opening Hours had collected five comments since staging was made: a question from Julia Brandt with a reply from the roastery team, a comment from Pedro Alves, a pending question from a new visitor, and one spam comment.

Browse and select them from staging

On staging, in Comments, we clicked Sync, chose the live site and clicked Browse remote comments. The list shows each comment’s author, ID, post and the start of the text; replies are indented under the comment they answer, and comments that are not approved say so. In Search posts we picked Winter Opening Hours, then ticked the three approved comments and left the pending one:

Remote Comments dialog on staging filtered to Winter Opening Hours with three approved comments selected and one comment labeled Pending
Live comments of one post; the pending one is labeled and left out.

Map to post sets the staging post the comments go to. Automap found Winter Opening Hours on staging by its title; you can also pick the post yourself. The spam comment wasn’t in the list at all.

What staging got

After Pull selected comments, Comments reported Comments pulled. Created: 3, Updated: 0, Failed: 0. The staging post had the three comments, approved, with the dates from live, and the roastery team’s answer still marked as a reply to Julia Brandt:

Comments on Winter Opening Hours on staging: Pedro Alves, Roastery Team in reply to Julia Brandt, and Julia Brandt, with dates from live
The pulled comments on staging, with their dates and the reply.
Comment on live Selected On staging after the pull
Approved question Yes Approved, same date
Approved reply to it Yes Approved, still a reply to the question
Approved comment Yes Approved, same date
Pending question No (labeled Pending) Not pulled
Spam Not listed Not pulled

When we pulled the same three comments again, the result was 0 created and 3 updated: staging still had three comments, not six.

Things to know

  • Select a reply together with the comment it answers, so the thread stays complete on staging.
  • The post must exist on staging first. If it doesn’t, pull the post before its comments.
  • Comments keep the author’s name and email. Linking a comment to a user account on staging is a separate PRO option; to get the accounts there first, see pulling users from live to staging.
  • A pull writes only to staging. The comments on live don’t change.

Before you pull, back up staging, or ask your AI agent to start the backup.

With an AI agent

Import Export by RockStarLab gives AI agents its exports, imports and Content Sync as abilities. Through the WordPress MCP Adapter, WordPress itself offers an agent only read-only abilities for site, user and environment information, so without the plugin the agent cannot do the steps above (to connect an agent, see connecting Claude Code to WordPress). With it, one request is enough:

With Import Export by RockStarLab, pull the approved comments of "Winter Opening Hours" from the live site into the same post on staging. Skip pending comments.

In our run, the agent listed the post’s comments on live with rsl-ie/sync-comments-browse, which returned four comments with their approval status (the pending one marked 0), kept the three approved ones and called rsl-ie/sync-comments-pull with their IDs and the staging post. Because the comments were already on staging, the result was 0 created, 3 updated, 0 failed, with the map from live comment IDs to staging comment IDs.

FAQ

How do I copy only approved comments from live to staging?

Browse the live comments from staging, tick only the approved ones and pull them. Pending comments are labeled, and spam isn’t listed.

Do comment dates and replies stay the same?

Yes. Pulled comments keep their dates from live, and a reply stays a reply to the same comment if both are pulled.

Will pulling the comments again create duplicates?

No. Comments pulled earlier are updated.

Can I pull comments into a different post?

Yes. Choose the staging post in Map to post instead of using Automap.

Get the free plugin on WordPress.org.

Dmitriy
About author

Dmitriy

WordPress Developer with 15+ years of commercial experience. Elite Author on ThemeForest and creator of custom WordPress plugins. Passionate about clean code, performance optimization, and building useful tools for the WordPress community.

JOIN THE CONVERSATION

Comments 0

Have a question or a tip to share? Leave it below.

Leave a comment

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

We store your name, email and comment to show and moderate it; your email is never published. Spam protection is provided by Cloudflare Turnstile and profile pictures by Gravatar. See our Privacy Policy.


Try the plugin with no risks!

New users get 1 month with access to all premium features. Experience the most powerful WordPress data engine today.

Download Now
Get PRO for FREE