Skip to content

Prefer DB_PATH for phpMyAdmin SQLite connections - #963

Merged
epeicher merged 1 commit into
WordPress:trunkfrom
JanJakes:sqlite-db-path
Oct 9, 2026
Merged

epeicher merged 1 commit into
WordPress:trunkfrom
JanJakes:sqlite-db-path

Conversation

@JanJakes

@JanJakes JanJakes commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

SQLite Database Integration now uses DB_PATH as the primary database path setting. Legacy constants remain supported, but DB_PATH takes precedence when both are defined.

This PR makes phpMyAdmin follow the same precedence, so it opens the active WordPress database when DB_PATH and FQDB disagree. FQDB remains the fallback for older integration versions, and the existing behavior when neither constant is available is preserved.

Randomized storage works through the path constants resolved by WordPress and its SQLite integration. No directory scanning or separate storage initialization is needed.

Verified against real WordPress databases with conflicting constants and randomized storage, including reads and writes in both directions between WordPress and phpMyAdmin.

Related: Randomized SQLite storage (#502) and DB_PATH support (#512).

See also: SQLite integration compatibility tracking (#513).

Open WordPress Playground Preview

Use the path resolved by WordPress before the legacy FQDB constant, preserving the empty-path fallback when neither is defined.

WordPress/sqlite-database-integration#512

@epeicher epeicher left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution @JanJakes!! I have reviewed the code, and LGTM! :shipit:

@epeicher
epeicher merged commit 307cbcc into WordPress:trunk Oct 9, 2026
7 checks passed
epeicher added a commit to AllTerrainDeveloper/desktop-mode-official-extensions that referenced this pull request Oct 9, 2026
Use the path resolved by WordPress before the legacy FQDB constant,
preserving the empty-path fallback when neither is defined. Ports
WordPress/openstation#963.

WordPress/sqlite-database-integration#512
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants