PBJ.TECH — WordPress Plugins

PBJ Studio Sync — User Guide

Version 3.0.0 · pbj.tech/wordpress-plugins

PBJ Studio Sync — Install & Usage Guide

Version 3.0.0

What this plugin does

PBJ Studio Sync pushes content one way, from a local WordPress Studio site (SQLite) to a live production site (MySQL). The same plugin installs on both sides and auto-detects which environment it is in:

Content moves over the WordPress REST API as native WP objects (posts, terms, meta, files), so the SQLite/MySQL differences are handled by WordPress itself — there is no raw SQL translation.

3.0.0 is an admin/UX release. The entire admin was rebuilt as a guided, per-sync-type UI — every page now walks you through what it does. No push/receiver logic changed: all 2.x safety rails are intact and 2.x ↔ 3.0 pushes are compatible.

Requirements

Installation

  1. Install and activate pbj-studio-sync.zip on both the Studio site and the live site (Plugins → Add New → Upload Plugin → Activate).
  2. If a Studio install refuses to replace an existing copy ("destination directory already exists"), use the pbj-installer helper plugin or remove the old pbj-studio-sync folder first.

First-time setup

On Studio, the Dashboard opens with a three-step "How Studio Sync works" stepper — Connect → Choose → Push. Each step shows its live status (connected? how many sync types enabled? pushed before?) and links to the tab where it happens, so you always know what to do next. Working through it is exactly the sequence below.

1. Verify the REST API on Live

On the live site, open Studio Sync → Dashboard and click Check / fix REST API. It rebuilds rewrite rules, sets permalinks to /%postname%/ if they were on "Plain" (which blocks REST routes), and self-tests /wp-json/. Wait for the green confirmation. If it still fails, the cause is outside the plugin — usually a security plugin blocking REST, or a server-config issue.

2. Create an Application Password on Live

On the live site: Users → Profile → Application Passwords. Add one named "Studio Sync" and copy the 24-character password (keep the spaces).

3. Connect Studio (Setup tab)

On the Studio site: Studio Sync → Setup. Step 1 is a numbered connection walkthrough — 1. Live site URL2. Live admin username3. Application Password4. Save, then test. Click Save connection, then the inline Test connection button right next to it. "✓ Connected — live site answered with its site info." means every sync feature will work.

The Setup tab has three sections, and each saves independently with its own button — saving one never touches the others:

4. Choose what a push sends (Sync by Type)

Studio Sync → Sync by Type. Eight sub-pages, one per sync type — Content, Media, Menus, Theme, Plugins, Site Settings, Users, Deletions. Each page:

Content, Media, and Menus are on by default; Theme, Plugins, Site Settings, and Users are opt-in. The Plugins page also holds the Plugins to exclude (fully unmanaged) list and the mu-plugins toggles; the Deletions page holds the tombstone queue (see below).

Users / Site Settings sync. These two clone the live site beyond content — Site Settings includes theme_mods (footers/headers/customizer) and plugin configuration; Users includes roles, profile meta, and password hashes. The plugin always protects the live site's site/home URL, active-plugins list, theme selection, and the operator's own login from being overwritten. Even so, test these against a staging copy before running them onto real production.

Daily usage

Pushing to live

Studio Sync → Dashboard → Push to live now — sends every type enabled on Sync by Type. The progress UI shows each stage in order: terms → uploads → posts → menus → theme → plugins → plugin states → mu-plugins → settings → users → prune → deletions → commit.

Pushing a single type

Studio Sync → Sync by Type → [type] → Push [type] to live now. Sends that one type, nothing else, right now. It's additive (never deletes on live) and — unlike Compare & Sync and Full Copy — it respects the plugin exclude list.

Deletions

When you trash a post or delete a media file on Studio, the plugin records a "tombstone". The next Dashboard push removes the same item from live by slug (including the underlying file for attachments). Untrashing a post before the next push cancels its tombstone. The queue lives at Sync by Type → Deletions, which shows exactly what will be deleted on the next push and offers Clear tombstones (skip these deletions). The per-type buttons on the other pages never delete anything.

Backups, exports and importing

Compare & Sync

Studio Sync → Compare & Sync (Studio only). The page now carries its own numbered how-to:

  1. Click Load comparison — each section (posts, media, terms, theme, plugins, settings, users, menus) shows its Studio count vs its Live count, with "≠" marking differences (those rows come pre-ticked).
  2. Tick the sections you want to move, then pick a direction: Upload overwrites LIVE with Studio; Download overwrites STUDIO with live (affects only your local site).
  3. Optionally tick Prune to make the destination an exact mirror — it deletes what the source doesn't have, so read its warning first.
  4. Click Run sync and watch the progress table. Errors name the exact item; details land on the Logs tab.

Theme and plugin files aren't included in backups, so they're disabled in the Download direction — use Upload for those. Both sites must be on 2.0.0+ for the comparison to load. The page also hosts Auto Sync (merge newest) — a one-click, both-directions, newest-wins merge that never deletes on either side.

Full Copy (3.0)

Studio Sync → Full Copy (Studio only). The "make the other site identical" tab — two one-click whole-site copies, no section picking, each gated behind a typed confirmation phrase plus a final confirm dialog:

For partial syncs use Sync by Type or Compare & Sync instead.

Auto-updates (optional)

Studio Sync → Setup → Plugin auto-updates. Point at a GitHub repo (user/repo) or a JSON manifest URL and click Save update settings, then Check for updates now. New versions then appear under Plugins → Installed Plugins with the normal "Update Now" button.

Troubleshooting

Where things live