Skip to content

Add a Cloudflare-hosted Playground runtime backend #1838

Description

@chubes4

Goal

Run the existing WP Codebox WordPress runtime contract on Cloudflare Workers, using WordPress Playground for PHP/WordPress execution and preserving Codebox ownership of recipes, commands, snapshots, restore, diagnostics, and artifact envelopes.

Architecture

  • Playground owns PHP-WASM and low-level WordPress runtime primitives.
  • WP Codebox owns runtime boot, command routing, snapshots, restore, diagnostics, and artifact contracts.
  • Cloudflare Workers provides compute; Durable Objects serialize site mutation; R2 stores durable state artifacts.
  • Markdown Database Integration can provide canonical file-backed WordPress state in a later slice.

Staged acceptance gates

  1. Boot WordPress through a Codebox runtime backend on Cloudflare and return a deterministic WordPress/PHP health envelope.
  2. Preserve Codebox command and artifact contracts without caller-visible Cloudflare semantics in runtime-core.
  3. Serialize one site through a Durable Object.
  4. Persist and restore a complete runtime-state artifact through R2.
  5. Prove mutation, cold restoration, and concurrent request behavior end to end.

Evidence

The lower-level PHP feasibility gate has passed in the maintained Playground fork: PHP 8.5.8 executed on Cloudflare Workers with the 21,019,221-byte Asyncify Wasm module under the 128 MB isolate limit. Working PR: chubes4/wordpress-playground#1

Related upstream tracker: WordPress/wordpress-playground#69

Compatibility

This should be an additive backend/integration. Existing Codebox runtime contracts, browser callers, recipes, and Playground behavior must remain compatible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions