Skip to content

Spurious "Loaded WordPress version differs from requested version" warning on every default boot #4246

Description

@amitraj2203

Description

Every default Playground boot logs a version-mismatch warning that is not a real mismatch:

Loaded WordPress version (7.0) differs from requested version (latest).

The website defaults the wp version to the literal string latest resolve-blueprint-from-url.ts:223. That alias is stored in requestedWordPressVersion as-is, but the comparison in finalizeAfterBoot() runs against the resolved build version returned by getLoadedWordPressVersion():

https://github.com/WordPress/wordpress-playground/blob/trunk/packages/playground/remote/src/lib/playground-worker-endpoint.ts#L365-L370

'latest' !== '7.0', so the warning fires even though the correct build loaded.

nightly is already normalized to trunk at the assignment site, and beta/trunk are real keys in wp-versions.json, so latest is the only alias that mis-compares — and it happens to be the default, so this fires for essentially every visitor.

Impact is low (a console warning, not shown in the Logs pane), but it is noise on every page load and it undermines the check: a genuine mismatch — the case the warning exists to catch, per the comment about WP loaded from browser storage — is indistinguishable from the default-boot false positive.

Step-by-step reproduction instructions

  1. Open https://playground.wordpress.net/ (or npm run dev) with the browser console open.
  2. Wait for WordPress to finish booting.
  3. Observe the warning above.
  4. For contrast, load ?wp=6.9 — an explicit version produces no warning.

Expected behavior

No warning when the loaded build is the one the requested alias resolves to. The warning should still fire for a genuine mismatch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions