Back to blog
5 min read Content Sync

Let an AI Agent Draft on Staging, Then Push the Approved Posts to Live

An AI agent can write and import blog posts into WordPress, but few site owners want it publishing straight to the live site. A safer workflow keeps the agent on a staging site: it creates drafts there, an editor reviews and publishes the good ones on staging, and only those approved posts are pushed to the live site. The setup uses Import Export by RockStarLab and the WordPress MCP Adapter. In the complete run below, the agent wrote three drafts, two were approved and those two were pushed.

Free: importing posts and pages, Content Sync, and the AI agent abilities for both. PRO: the same for custom post types and WooCommerce products, plus transformations during import.

Short Answer

  1. Connect the agent to the staging site only.
  2. The agent imports its posts as drafts (or Pending Review).
  3. An editor reviews them on staging and clicks Publish on the approved ones.
  4. The approved posts are pushed to live with Content Sync, by the editor or by the agent.

The agent never gets access to the live site: the push goes through the Content Sync connection that staging already has.

Why staging first

  • The live site stays untouched until a person approves. Drafts the agent writes on staging can’t appear on live by accident.
  • The agent needs only staging credentials. If its application password leaks or it misreads a prompt, the damage is limited to staging.
  • Review happens in the normal editor, with the theme, blocks and preview of a real copy of your site.

You need a staging copy of the site and a Content Sync connection from staging to live; see How Content Sync works. To connect the agent, see connecting Claude Code to WordPress, and use the staging site’s address and an application password of a staging user.

Step 1: The agent writes drafts on staging

A prompt in our run:

Write three short posts for our bakery blog: how to store sourdough bread,
why our croissants take three days, and our gluten-free options. Import them
on this site as drafts with the categories "Baking Tips" or "Menu".
Don't publish anything.

The agent wrote a three-row CSV file and imported it with the plugin’s abilities:

  1. rsl-ie/upload-create, rsl-ie/upload-chunk and rsl-ie/upload-complete uploaded the file;
  2. rsl-ie/import-prepare returned the columns and a suggested mapping (title, content, excerpt, status);
  3. the agent added the categories column to the mapping and started rsl-ie/import-start with post_status: draft and duplicate check by title.

The import job created three drafts with their categories. When we ran the same import again, the job skipped all three rows because the duplicate check found the titles, and the posts already published by the editor kept their status.

Step 2: Review and publish on staging

The drafts appear on Posts on staging like any other draft. Open each one, edit it, and click Publish when it’s ready. Publishing on staging is the approval: it changes nothing on the live site. In our run, the editor published two posts and left “Gluten-Free Options at the Bakery” as a draft to check the allergen details first.

Posts list on staging: two agent posts published in Baking Tips and selected, Gluten-Free Options at the Bakery still a draft, with the Sync Content button above the list
On staging: two drafts approved and published, one still a draft.

If your team uses Pending Review for posts waiting for an editor, ask the agent to import with that status instead of draft.

Step 3: Push the approved posts to live

From the screen: tick the published posts, click Sync Content, choose the live site, Push to Site, check that each row says Create New Post (or Update for a post that already exists on live), and click Confirm & Sync.

Map Posts for Sync window with Why Our Croissants Take Three Days and How to Store Sourdough Bread both set to Create New Post
Only the two published posts are pushed; both are new on the live site.

Or ask the agent:

Check which of the three posts you imported are published now.
Push only the published ones to the live site and leave the drafts.

In our run, the agent read the status of the three posts with rsl-ie/export-preview (two published, one draft), checked the live site with rsl-ie/sync-auto-map (no existing posts with those titles), and pushed the two published posts with rsl-ie/sync-push-start. On the live site, both posts were published with the category “Baking Tips”, which Content Sync created there. The draft stayed on staging only.

The status travels with the post: a post published on staging is published on live, and a draft pushed by mistake arrives as a draft. Pushing creates and changes content on the live site, so create a backup of it before the first push of many posts.

Rules worth giving the agent

  • “Import as draft, never publish.” The status is set in the import itself, so the agent can’t publish by forgetting a step.
  • “Push only posts that are published on staging.” The editor’s Publish click is then the only approval needed.
  • “Never pick between posts with the same title on live; ask me.” Auto-match leaves such posts without a pair; see how Auto-match by Title works.
  • “Report the job IDs.” Every import and push is in Jobs Log, so you can check what the agent did.

FAQ

Does the AI agent need access to the live site?

No. It works on staging, and the push to live goes through the Content Sync connection stored on staging.

How do I approve a post the agent wrote?

Review it on staging and click Publish. Only published posts are pushed to live in this workflow.

Can the agent publish directly to the live site?

Not in this setup: it isn’t connected to the live site, and the posts it imports on staging are drafts.

Are categories and images copied to live?

Yes. Content Sync creates missing categories and tags on live and uploads the featured image and images in the text.

What if I edit an approved post after it was pushed?

Edit it on staging and push it again. Auto-match finds the post on live by its title and updates it.

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