Repository navigation
[Website] Skip WordPress installation when WordPress files already exist - #3065
Merged
Merged
Conversation
When loading a saved site, there's no need to run the WordPress installer because the files are already in place. This change uses the 'install-from-existing-files-if-needed' mode which checks if WordPress is installed before making the installer request. This saves around 600ms during boot on a MacBook Pro.
adamziel
commented
Dec 18, 2025
| .then((r) => r.blob()) | ||
| .then((b) => new File([b], 'wp.zip')) | ||
| : undefined, | ||
| wordPressZip: wordPressRequest |
Collaborator
Author
There was a problem hiding this comment.
wordPressRequest is undefined when !shouldInstallWordPress
adamziel
commented
Dec 18, 2025
| wordPressZip: wordPressRequest | ||
| ?.then((r) => r.blob()) | ||
| .then((b) => new File([b], 'wp.zip')), | ||
| sqliteIntegrationPluginZip: sqliteIntegrationRequest |
Collaborator
Author
There was a problem hiding this comment.
sqliteIntegrationRequest is always set.
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.
Summary
Without this PR https://playground.wordpress.net/ always runs the WordPress installer even when running a mini fight site that's already pre-installed and shipped to the SQLite database. This adds around 600 milliseconds to every playground boot on a beefy MacBook Pro.
With this PR, that WordPress installer request is skipped when possible. How? It sets the
wordpressInstallModetoinstall-from-existing-files-if-neededthat makes the installer optional.Test plan