Skip to content

Add WordPress Playground-based environments for agent and CI use in worktrees #319

@fabiankaegy

Description

@fabiankaegy

Summary

Add WordPress Playground-based environment configurations to the scaffold so that AI agents and CI pipelines can spin up full WordPress environments inside git worktrees or ephemeral CI runners without needing Docker or external hosting.

Problem

Currently, working with the scaffold in isolated contexts (git worktrees, CI jobs, agent-driven development) requires either a Docker-based local environment or a remote server. This creates friction for:

  • AI coding agents operating in git worktrees that need a running WordPress instance to validate changes, run integration tests, or interact with the WP REST API.
  • CI pipelines that need lightweight, disposable WordPress environments for end-to-end testing without the overhead of Docker or external infrastructure.
  • Contributors who want to quickly preview or test changes without setting up a full local environment.

Proposed Solution

Integrate WordPress Playground (wp-now / Playground CLI) into the scaffold to provide zero-config, ephemeral WordPress environments. This could include:

  • A wp-playground configuration (e.g., playground.json or similar blueprint) at the project root that defines the environment (PHP version, WP version, plugins, theme mapping).
  • Scripts or Makefile/Composer targets to start a Playground instance mapped to the scaffold's theme/plugin structure.
  • Documentation on how agents and CI runners can leverage these environments.
  • Integration with existing CI workflows (GitHub Actions) to spin up Playground for automated testing.

Use Cases

  1. Agent workflows: An AI agent working in a worktree runs npx wp-now start (or equivalent) to get a live WordPress instance, then validates theme/plugin changes against the running site.
  2. CI integration tests: GitHub Actions spin up a Playground instance, install the scaffold's theme/plugins, and run integration or E2E tests without Docker.
  3. Quick contributor previews: New contributors can preview the scaffold with a single command, no environment setup required.

Additional Context

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