[Personal-WP] Improve recovery mode and add direct OPFS file browser access#3182
Merged
[Personal-WP] Improve recovery mode and add direct OPFS file browser access#3182
Conversation
3c9976a to
85503ba
Compare
…access - Add skipWordPressInstallCheck option to prevent WordPress from booting before blueprint steps run during recovery mode. This allows the recovery blueprint to install mu-plugins even when a broken plugin would crash WordPress on boot. - Add direct OPFS file browser access when PlaygroundClient is unavailable. This allows browsing and editing files even when the site has crashed, enabling manual fixes without needing WordPress to boot.
85503ba to
f2889aa
Compare
Collaborator
|
Could we not use the |
…allCheck Addresses review feedback to use the existing public API option instead of introducing a new boolean flag that would eventually need deprecation.
Member
Author
|
Oh wow, I missed that opportunity. Yes, I'll use that! |
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.
Motivation for the change, related issues
When a site crashes due to a broken plugin, recovery mode was failing because WordPress would boot and crash before the recovery blueprint could install the mu-plugins needed to disable the broken plugin. Additionally, when a site is crashed, users couldn't browse or edit files to manually fix issues.
I had this implemented in my https://github.com/akirk/wordpress-playground/ fork but missed to migrate it here.
Implementation details
wordpressInstallMode for recovery: In recovery mode, pass
wordpressInstallMode: 'do-not-attempt-installing'to prevent WordPress from booting before blueprint steps run. This allows the recovery blueprint to install mu-plugins even when a broken plugin would crash WordPress on boot.Direct OPFS file browser access: When PlaygroundClient is unavailable (site crashed), the file browser now falls back to accessing OPFS directly via
OpfsFilesystemBackend. This allows browsing and editing files without needing WordPress to boot.Testing Instructions (or ideally a Blueprint)