Repository navigation
Fix Adminer database selection for randomized SQLite storage - #619
Merged
Merged
Conversation
Read Playground's runtime metadata for automatic login and database selection. This follows DB_PATH before legacy FQDB and supports randomized storage in both Core and Gutenberg launch modes. Update the database guide to describe the active path instead of a fixed filename. Playground records the active path here: https://github.com/WordPress/wordpress-playground/blob/1f92c10bd871c224baf44300d730fd22a9f83715/packages/playground/wordpress/src/platform-mu-plugins.ts
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
11 of 20 tasks
JanJakes
marked this pull request as ready for review
October 5, 2026 12:56
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.
Why
Adminer hardcodes
/wordpress/wp-content/database/.ht.sqlite, so it can open the wrong database when WordPress uses randomized storage or an explicitDB_PATH.What changes
Use Playground's runtime database metadata for automatic login and database selection in both Core and Gutenberg sites. Playground records the path after WordPress initializes, preferring
DB_PATHover legacyFQDB. Update the database guide accordingly.How to test this
Platforms: macOS or Windows, using the current head. Local validation ran on Apple Silicon macOS.
Starting state: An initialized Core or Gutenberg site using legacy fixed storage, randomized storage, or an explicit
DB_PATH. The latter two require a SQLite integration build with the new storage support; setDB_PATHbefore WordPress first loads.wp_posts. Adminer's database path should match the site's configured or generated SQLite path.What must not have happened: Adminer must not select or create a second database at the old fixed path.
Risks and limitations
No new automated regression test is included; validation relies on the live checks below and Playground's existing metadata contract. Windows was not run locally. The interface is unchanged.
Validation details
Tested WordPress 7.0.1 and bundled Adminer on Electron 43.6.0 in both Core document-root and Gutenberg plugin-mount modes. The latter used a small activation-probe plugin.
Storage cases covered the bundled SQLite plugin, released SQLite integration 3.0.2, and revision
4163f69f3d543ec7d6085bbb0c4e0c36b36c0156with randomized storage and explicitDB_PATH. The explicit path contained spaces and an apostrophe and overrode a conflictingFQDB. In every case, Adminer selected WordPress's active database and read an option written by WordPress.An app-level check clicked Start dev server, launched the real server child, and read the saved option through Adminer. Existing Node and Electron suites, lint, and the documentation build passed.
Review outcome
0 [fix here] · 0 [follow-up]. Local review completed across all five dimensions for the final two-file diff: head
fbcab67c9025f01e08fe54bc678592cfd19c0801, base9ee21dd4058bfb879807c54b4373d1c6e5237ce5. No findings. The test omission is intentional; existing suites and lint passed on the reviewed commit.Related
Playground references: Adminer integration and metadata writer.
DB_PATHsupport: SQLite integration #512.