Sync does not need a week. A day is enough to connect the reference site, prove the round trip, rehearse a conflict and bring the team in. The goal is not process for its own sake. It is to make the first real edit routine.
| Stage | Time | Done when |
|---|---|---|
| Prepare | 15 min | The repository, token and logins are ready. |
| Connect the reference site | 15 min | The first commit is in the repository. |
| Prove a draft | 20 min | The second site has the draft, image and link. |
| Rehearse a conflict | 20 min | You have resolved one and seen a clean merge. |
| Add the team | 15 min | Every editor has an account and a page. |
| Turn on automatic sync | 5 min | The queue has an owner. |
Before you start (15 minutes)
- Back up the database and uploads, then restore both to a spare copy and open it. A backup you have not restored is not a backup.
- Make a private repository, separate from the one StaticScope publishes to. Different files, different permissions, different blast radius.
- Create a fine-grained token with Contents read and write for that one repository.
- Use the same login on every install. Authors are matched by login, never user ID.
Sync moves current documents, not users, options or revisions. The first sync writes every post, page and referenced image, including drafts and private posts.
Private means private. Sync cannot tell a public repository from a private one, and it will push drafts to either. Keep the repository private.
Connect the reference site (15 minutes)
Choose the site whose content should be canonical. The first site fills the repository and becomes the version every other site merges against. If production is the reference, connect production first.
Connect it under StaticScope → Sync. Connect and check tests read access only, so a read-only token passes and then fails on the first push. Use a token that can read and write.
Press Sync now, then check the repository rather than the toast:
- One commit on the content branch, messaged
Sync from <site>unless a filter changed it. items/with one JSON file per post and page in a syncable status.attachments/with records only for files a post references.environments/with one record for this site, and media bytes on<branch>-media.
Open one document. Fields should look like the post, with {{uploads}} and {{post:…}} tokens where a URL would sit. If that reads like sense, the model works. A big site takes longer than a minute because the screen exports every post to count changes.
Prove a draft (20 minutes)
On the reference site, write a draft with a heading, two paragraphs, a link to another page and one image. Publish nothing. Sync, connect the second site and sync again.
Open the draft on the second site. Four conditions should hold:
- It is still a draft.
- The image is in the media library and displays.
- The link points at the second site’s permalink, not the first site’s address.
- The author is the same person, or the post is held by a fallback user with a notice.
If the image is missing, check the media warning: a referenced file over 25 MiB stays on the site that has it. If the link points at the first site, the URL was written as a full host Sync does not recognise; the staticscope_sync_internal_hosts filter fixes that.
One draft proves the model without touching the live site.
Rehearse a conflict (20 minutes)
Both sites clean and in step. Edit the same paragraph of the same post on both sites, with different words, and save both. Sync site A: it pushes. Sync site B: it does not. The screen shows 1 change needs your review, and nothing is pushed until you choose.
Open Review. Read Theirs, Yours and Preview merge. Resolve with Keep mine, Take theirs or Use the merge, then sync again. The repository log shows site B’s commit only after the resolution.
Now repeat with non-overlapping edits in the same post. That merges with no queue. The lesson is the boundary, not the buttons. Teams often skip this step. Do it once with a test paragraph you can discard.
Add the team (15 minutes)
Create the account on every install before the editor writes anything. Sync never creates users. A post whose author has no local account is held by the person who synced, with a notice.
Give a new editor one section and one install for the first day, and watch the attribution. A fast-forward keeps the other person’s name, a local edit takes yours and a merge takes whoever resolved it.
Two rules: one owner per page, and nobody resolves a conflict on a site where they cannot see the other version.
Turn on automatic sync (5 minutes)
Turn it on once the team has seen the queue and knows who clears it. Automatic sync runs every 15 minutes, first after five, and only when WP-Cron gets traffic. On a quiet staging site that can mean never, so add a real cron job hitting wp-cron.php if the schedule matters.
Cron syncs content. It never builds or publishes. A failure is stored and shown the next time you open the Sync screen; there is no email or log. If the team is not ready, leave it off. Manual sync is not a failure.
What to watch during the rollout
| Signal | What it means | What to do |
|---|---|---|
A commit where pushed is 0 | An attachment record or the environment changed, not a post | Read the commit first. |
| “N changes pulled” on a site nobody touched | Someone else synced, or cron did | Read the diff, then build. |
| A Worth a conversation card | A theme, plugin, permalink or post type differs | Decide who owns it. Ignore hides it until the value changes. |
| “This preview is missing synced changes.” | The preview was built without a clean sync | Fix Sync, then build again. Publishing is blocked. |
| “A sync is already running…” | The site lock is held, usually by cron | Wait. A crashed run releases after ten minutes. |
What to avoid
- Using the publishing repository. Different files, permissions and blast radius.
- Turning on automatic sync before anyone has resolved a conflict. Background sync turns a disagreement into an error nobody watches.
- Removing the token to stop sync. The site stays configured, cron keeps firing and every run fails. Uncheck Automatic sync instead.
- Cloning the database and expecting two peers. The site ID is copied. Change or delete
staticscope_sync_site_idon the clone. - Expecting custom post types, menus, widgets, settings or theme files to travel. None of them sync.
- Publishing a preview built before the sync, or assuming a clean sync changed the live site. Sync changes WordPress. Publishing is a separate act.
Next
- Set up Sync: repository, token and the connection screen in detail.
- Conflicts and review: the rules behind the queue you practised.
- Multiple editors and staging: running this with more than two sites.