Merge two posts into one

MaintenanceIntermediate~15 min

Before you start

A connected site with content reads and content writes enabled so the agent can read both posts, update one, and trash the other.

Two posts covering nearly the same thing is a common mess: they split your search ranking, and a reader who lands on one never sees the other. The fix is to fold them into a single stronger post and retire the loser, but nobody wants to hand-stitch two bodies together and then second-guess which URL to keep.

This reads both, proposes one merged version, and only trashes the leftover after you have signed off.

The prompt
I have two posts that overlap and I want to merge them: [/post-a/] and
[/post-b/]. Do not change anything yet.
Read both in full. Then propose a single merged post: combine the two bodies
into one, drop the repetition, keep the best of each, and tell me which post
you would keep as the home for the merged content and which you would trash.
Show me the merged copy and your reasoning. Change nothing until I approve
both the copy and which post to keep.
Once I approve, update the keeper with the merged body, then move the other
post to the Trash. Do not permanently delete anything. When you are done, tell
me what you changed, confirm the trashed post can be restored, and remind me
the keeper's old version is saved as a revision.

Why this is safe to run

Reading both posts writes nothing, so you see the full merged draft and decide which URL survives before anything is saved or removed.

The two writes are deliberately split. Updating the keeper only edits its body and never changes its published status, and its previous version is saved as a revision. Trashing the other post moves it to the Trash rather than deleting it, so it stays recoverable until you empty the Trash yourself. Nothing here bypasses that safety net. Each ability is off until you enable it, every call is checked against the capability of the user you bound the agent to, and both the update and the trash land in the Activity Log with the post ids, so you can see exactly what happened.

Already connected? Skip the paste. Ask your agent for the “merge two posts into one” recipe, name the two posts, and it runs the same read-propose-approve flow on your own site.

How it works

  1. Read both posts you name, in full, and change nothing.
  2. Propose one merged version and say which post it will keep and which it will trash.
  3. Wait for approval on the merged copy and the keep-or-trash call.
  4. Update the keeper with the merged body, then trash the other post.
  5. Return what changed and note the trashed post is recoverable and revisions are kept.

Questions

Is the trashed post gone for good?
No. It is moved to the Trash, where WordPress keeps it until you empty it, so you can restore it. The agent never permanently deletes a post here.
What about links pointing at the post that gets trashed?
The merge itself does not redirect them. Decide which post to keep partly on which URL has the links, and set up a redirect from the old URL separately if you need one.