Sync treats every install as a peer. There is no staging role, no production flag and no primary site. A staging install, a production install and a designer’s local copy are the same type of site: a WordPress site with its own content, its own base and its own environment record, reading and writing one repository.
That is a simpler model than most staging workflows, and it has consequences. Nobody’s edits are authoritative by default. The repository is the shared truth, and the merge rules decide what happens when two people touch the same thing.
Every site is a peer
Each install generates a site UUID and stores it in the staticscope_sync_site_id option. On sync it writes environments/<site>.json: the host, URL, WordPress and PHP versions, theme name and version with a hash of its files, active plugins and versions, permalink structure and public post types. The record is written only when it differs from the one already in the repository.
Environment differences become “Worth a conversation” cards. A staging site on a different theme, a plugin that exists on one install only, a permalink structure that does not match: these are reported, not fixed. Sync will not copy a plugin or rewrite your permalinks because another site has different ones. Someone needs to know, and then someone needs to decide.
The environment URL is used for “Open their site” and for the copied message. It is not checked for reachability. A staging site behind HTTP auth will still appear as a peer even if nobody can open it from the admin.
The collaboration model
There is no real-time co-editing. An edit is local until a sync. On different sites, changes to different paragraphs or different fields merge silently. Changes to the same paragraph or field become conflicts. On the same site, two editors are serialised by WordPress; the last save wins locally. The sync lock only stops two syncs running at once.
The first site to push wins the branch update. The second site’s compare-and-swap fails, it re-reads, re-merges and tries once. If the merge is clean, both sets of changes end up in the repository. If not, the second site queues a conflict and pushes nothing.
Attribution names the person who saved the version: a fast-forward keeps the remote author, a local edit gets the current user and a merge gets the person who resolved it. This is separate from the post’s author, which is matched by login. The distinction matters when one person writes and another publishes.
Authors are people, not user IDs
Author identity is the login. A user ID from staging means nothing on production, so Sync stores the login and display name in the document and resolves the login locally. If the login exists, the post is assigned to that user. If it does not, the post is held by the person syncing, or by the first administrator for a background sync, while the document keeps the login and name.
Sync never creates user accounts. The post edit screen explains the situation and offers to create the account if you can. When the account is created later, still-held posts move to it. An author change in WordPress is a content change and syncs. A display-name change is local presentation and does not.
Automatic sync and background jobs
Automatic sync is on by default: every 15 minutes, first run after five, only when the setting is on and the site is configured. It is WP-Cron, so it needs traffic. A staging site nobody visits will not sync on its own, which is a common reason for “staging is behind” and rarely a Sync bug.
The site lock stops cron and a button press from running together on the same install. A crashed run’s lock is treated as stale after ten minutes. Failures are silent apart from the stored error shown on the next Sync screen. Cron never builds or publishes. If you want a build or a deploy after a sync, use the staticscope_sync_finished action in your own automation.
Staging to production
A typical flow looks like this. It is a sequence, not a rulebook; the important part is the order of code, content and publish.
- Deploy code first. If the new content uses a block, field or template that exists only on staging, deploy that code to production before the content arrives. Sync moves content, not PHP, templates or plugin settings.
- Sync the site where the writing happened. If editors work on staging, sync staging to push. If production also receives edits, sync it too. Both are peers.
- Resolve conflicts where the decision belongs. The person who owns the content should choose. Resolving on the wrong site is how a good draft gets replaced by an old one.
- Sync production and check it. Pull the content, then look at the Sync screen: conflicts clear, counts settle and the status band reads “Everything is in step” or “Content is in step”.
- Build a preview. The preview shows the static output, rather than the WordPress edit screen. Check the pages that changed and any page that links to them.
- Publish. Publishing replaces the live site. It does not merge with what is there now, so the preview you publish is the site you get.
Publish and build are separate
A preview is permissive. If the repository is unreachable, the lock is held or conflicts are waiting, StaticScope still builds from local content, records the reason and warns on the Overview that the preview is missing synced changes. You get something to look at.
A publish-bound build is the gate. It stops on those same conditions with a plain message rather than raw Git output. Publishing also refuses a preview that was built without a clean sync, and refuses a build older than the content. Publishing replaces the site, and a stale build can undo someone else’s work in one click.
If you work alone and want to build without syncing, the filter staticscope_sync_preflight turns the build sync off. Treat that as an escape hatch, not a default. It does not clear an old “built without sync” reason, so a build with the preflight off can still inherit a block from a previous run.
Cloning a site for staging
A database clone is not a new peer. The site ID lives in an option, so cloning the database copies it. The two installs then share one environment record, compare as the same site and overwrite each other’s fingerprint. They will not appear as separate sites in “Worth a conversation”. Change or delete staticscope_sync_site_id on the clone to give it its own identity.
Do that before the clone’s first sync. Change the clone rather than production, so production keeps the identity its history already refers to. The next sync writes a new environments/<uuid>.json and the two sites start comparing properly.
Multisite is untested. The environment code reads network-active plugins, but settings and the site ID are per-site options. Treat a multisite network as unsupported rather than as a clever way to sync many sites at once.
Operational advice
- Give each field or section one owner. The merge handles different paragraphs well. It cannot save two people rewriting the same paragraph.
- Sync small and often. Three small syncs produce three small reviews. Thirty unresolved conflicts produce a queue nobody wants to read.
- Clear the queue before a publish-bound build. One open conflict blocks the whole push.
- Keep the repository private and separate from the publishing repository. It contains drafts and private posts, and its token can write.
- Take backups. The repository is transport, not a restorable copy of the site. Keep database and uploads backups you have tested.
- Deploy code before content that needs it. A block that does not exist on production renders as nothing useful, no matter how clean the merge was.
- Read the media warnings. Over-limit and skipped files do not block a push, so they will not stop you publishing a page with a broken image.
- Use a real cron job. Relying on visitor traffic for a 15-minute schedule is optimistic on staging and fragile on a low-traffic production site.
Next
- Set up Sync: connection, token and automatic sync.
- Conflicts and review: the rules two peers are playing by.
- Environments: how StaticScope handles preview, staging and production builds.