Fix updateSiteUrl() not taking effect on runtime: native-php imports - #4454
Open
fredrikekelund wants to merge 1 commit into
Open
Fix updateSiteUrl() not taking effect on runtime: native-php imports#4454fredrikekelund wants to merge 1 commit into
updateSiteUrl() not taking effect on runtime: native-php imports#4454fredrikekelund wants to merge 1 commit into
Conversation
Collaborator
📊 Performance Test ResultsComparing 1774dcd 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) |
bcotrim
reviewed
Aug 5, 2026
bcotrim
left a comment
Contributor
There was a problem hiding this comment.
Approach looks right, and no regressions from the tests I ran.
I couldn't replicate the original issue on trunk though — pulled a remote site and wp option get home returned the local URL there too. Does the remote need particular conditions?
| } | ||
| } | ||
|
|
||
| await installSqliteIntegration( site.path ); |
Contributor
There was a problem hiding this comment.
Why not keepSqliteIntegrationUpdated here? The needsSqliteSetup guard exists for the MySQL workflow. Doesn't this reinstall SQLite over it?
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
I used Claude to iteratively reach the desired end state through an update-review-then-update workflow. I then used Codex to review the work.
Proposed Changes
STU-2197 revealed an underlying problem in
BaseBackupImporterwhen used withnative-phpruntime sites:updateSiteUrl()did not work as expected. This was because WP-CLI could not connect to the database to run thewp option getandwp search-replacecommands.The Linear issue describes how this makes
studio wp option get homereturn an unexpected result, but the consequences are actually much wider: allpost_contentURLs remain directed at the production site.This PR fixes the problem by ensuring that
BaseBackupImporterupdateswp-config.php, installs the SQLite integration plugin, and installs all the Studio-specific mu-plugins. By the timeupdateSiteUrl()is called inimportDatabase(), all the prerequisites for WP-CLI to work are now in place.Testing Instructions
npm startConnect a siteand pull one of your remote sitesstudio wp option get homePre-merge Checklist