Docs/Conflicts, Backups & Rollback

Conflicts, Backups & Rollback

Choose conflict strategies, create backups, and roll back risky imports.
Updated July 2026·WPChangeSync 2.1

Conflict handling

A conflict happens when you import an item that already exists on the target site. Rather than guessing, WPChangeSync stops and shows you both versions so you can decide.

The resolution strategies are skip, overwrite, merge, and prompt. Integration manifests can set a sensible default per data type, and an import request can pass an explicit strategy, which is what makes unattended workflow runs predictable.

When the plugin prompts, the conflict modal compares the incoming version against the current one. You can Keep Current to skip the item, or Replace with Import to overwrite it. Preview Import builds a temporary copy so you can compare the two side by side in the browser; preview items are cleaned up automatically after an hour.

Two behaviours worth knowing: a skip genuinely leaves the item alone, including its media, builder references, and place in a page tree, and a merge does not leave unreachable leftover elements behind.

Backups before writes

When an import would overwrite something that already exists, WPChangeSync snapshots the current state first. There are two mechanisms, depending on what is being overwritten:

  • Bricks templates use Bricks' own native version history, so the rollback lives where you would expect it.
  • Every other post type gets a JSON snapshot stored in post meta.

To roll something back, the Posts and Pages lists show a Restore Backup row action on any item that has one, and the edit screen carries a Restore Latest Backup box. Both return the item to the snapshot taken before the last overwrite. Restoring a template version restores it completely, including removing meta that was added after the snapshot was taken.

Element-level batch imports take one backup per job rather than one per element, so a 500-element import no longer produces 500 snapshots.

These snapshots are a convenience, not a backup strategy. Before a bulk import, a licence activation, or switching a production site to automatic sync, take a full database backup.

Use prompt or dry run for uncertain production imports

When destination data may have changed independently, run a dry run and use prompt-oriented strategies instead of blind overwrite.

Operational pattern

A reliable release pattern: preview, compare, resolve conflicts deliberately, import, then read Activity to confirm what actually changed. Keep the backups until the release has been verified in the browser, not just until the import reports success.

Clear old backup indexes only once the recovery window has genuinely passed. If an import was paused for a decision, resolving it records the item under Pending Conflicts, so nothing is left in an ambiguous state.

Import inputs

Import operations can receive selected integration data, conflict resolution options, item maps, and ID remapping information generated during related-data imports.

$pathstringRequired

Absolute path of the directory to write the snapshot to.

$modestringOptionaldefault: two-way

Sync direction — push, pull or two-way.

$gitboolOptionaldefault: false

When true, commits the snapshot to the repository after writing.