Import MySQL remote sites into COW branches#378
Merged
Conversation
Teach remote clone to export MySQL-backed WordPress databases over SSH, import them into the local SQLite sidecar, and branch with normal merge metadata and ID bands.
Merged
adamziel
added a commit
that referenced
this pull request
May 18, 2026
## Release `v0.1.46` Version bump and release metadata update for `v0.1.46`. **Changelog draft:** * Import MySQL remote sites into COW branches ([#378](#378)) **Full changelog:** v0.1.45...release/v0.1.46 ## Next steps 1. **Review** the changes in this pull request. 2. **Push** any additional edits to this branch (`release/v0.1.46`). 3. **Merge** this pull request to publish `v0.1.46`. Merging will automatically build ForkPress binaries, create a GitHub release, and update the Homebrew formula. Co-authored-by: Codex <codex@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it does
Allows
forkpress remote clone ... --branch <branch>to work with normal MySQL-backed WordPress sites. When the synced remote cache does not includewp-content/database/.ht.sqlite, ForkPress exports the remote MySQL tables over SSH and imports them into the local SQLite sidecar before creating the COW branch.Rationale
The previous path only worked for ForkPress-compatible remotes that already had
.ht.sqlite. A standard WordPress host could sync files successfully, then fail during branch creation with:ForkPress branches need a local SQLite database so existing merge-base snapshots, row identity capture, and per-branch ID bands keep working. Importing MySQL into the cache keeps the rest of the branch/merge model unchanged.
Implementation
mysqliexporter that reads commonwp-config.phpdatabase constants without booting WordPress.remote clonewhen the cache haswp-config.phpbut no.ht.sqlite.Testing instructions
I also ran the remote-cache e2e slice against a local debug binary built with a current temporary runtime bundle: