Skip to content

Fix fresh multisite database setup - #492

Open
JanJakes wants to merge 1 commit into
trunkfrom
multisite
Open

Fix fresh multisite database setup#492
JanJakes wants to merge 1 commit into
trunkfrom
multisite

Conversation

@JanJakes

Copy link
Copy Markdown
Member

Summary

This fixes fresh multisite installation when the SQLite database is still empty.

The change:

  • Treats a missing blogs table as an empty list of existing sites during information schema reconstruction.
  • Continues to surface unrelated SQLite errors.
  • Covers empty, partially initialized, existing, and invalid multisite databases.

Closes #490.

Why

When MULTISITE was defined before installation, database startup queried wp_blogs before WordPress had created it. The connection failed, so WordPress never had the opportunity to install the network tables.

Validation: The reported workflow was reproduced end to end with a fresh SQLite database and WordPress 7.0.1. wp core multisite-install completed successfully, and the resulting network and main site were verified.

Avoid querying the WordPress blogs table until it exists during information schema reconstruction. Cover empty, partial, and existing multisite databases.
@JanJakes
JanJakes marked this pull request as ready for review August 17, 2026 13:34
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.

v3.0.0: connection fails on a multisite install with an empty database (no such table: wp_blogs)

1 participant