Skip to content

Prefer DB_PATH for phpMyAdmin SQLite connections - #2

Merged
epeicher merged 1 commit into
trunkfrom
fix/phpmyadmin-sqlite-db-path
Oct 9, 2026
Merged

epeicher merged 1 commit into
trunkfrom
fix/phpmyadmin-sqlite-db-path

Conversation

@epeicher

@epeicher epeicher commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Ports WordPress/openstation#963 to this extension.

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 makes phpMyAdmin follow the same precedence as the integration's own drop-in (DB_PATH, then FQDB), so it opens the active WordPress database when the two constants disagree. FQDB remains the fallback for older integration versions, and the existing behavior when neither constant is defined is preserved.

Randomized storage works through the path constants the drop-in resolves, so no directory scanning or separate storage initialization is needed.

The connect() change is identical to the one merged in OpenStation; only the surrounding comments are touched otherwise. The wp-desktop-mode marker that window.php uses to restore the stock driver is unchanged.

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

Testing

  1. On a site running SQLite Database Integration, open the phpMyAdmin window and confirm it lists the WordPress tables.
  2. Define a DB_PATH that differs from FQDB in wp-config.php and confirm phpMyAdmin shows the same data as WordPress (edit a row in one, see it in the other).

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
@epeicher
epeicher merged commit e917d4f into trunk Oct 9, 2026
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.

1 participant