Set Playground runtime on reprint-pulled sites to fix startup DB error#3922
Closed
epeicher wants to merge 3 commits into
Closed
Set Playground runtime on reprint-pulled sites to fix startup DB error#3922epeicher wants to merge 3 commits into
epeicher wants to merge 3 commits into
Conversation
Contributor
|
Is it the correct approach? What if we remove support for Playground? |
Collaborator
📊 Performance Test ResultsComparing 5e96fad vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
1 task
Contributor
Author
Good catch! I came here to comment that this approach will be superseded by #3881 - comment here so I am closing this PR |
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.
Related issues
How AI was used in this PR
Claude Code diagnosed the failure from the Studio + daemon logs, reproduced the root cause with the bundled PHP binary, implemented the fix and a regression test, and verified it end-to-end with a real
pull-reprint. I reviewed the diagnosis and change.Proposed Changes
Sites imported with
studio pull-reprintfailed to start, dying with "Error establishing a database connection."The bug: a reprint-pulled site's files are laid out for the Playground runtime — VFS mounts place
wp-content(and its SQLitedb.phpdrop-in) under/wordpress/wp-content. But the site was registered without a runtime, so it defaulted to native-php. On that runtime PHP resolves the symlinked layout to the real WordPress core path,WP_CONTENT_DIRno longer points at the SQLite drop-in, WordPress falls back to MySQL, and the connection fails.The fix: register reprint-pulled sites with the Playground runtime (the runtime they're already built for and the one the command uses for the auto-login URL), so they start correctly.
Testing Instructions
npm run cli:buildnode apps/cli/dist/cli/main.mjs pull-reprint --url <your-site>.wpcomstaging.com -ystudio stop --path ...and start it by runningstudio start --path ...trunkthe site does not start successfullyPre-merge Checklist