Skip to main content

LocalWP Devkit

The Oh My IDEtch LocalWP Devkit is a reusable workspace for building code-owned Etch sites against LocalWP. Local owns WordPress, PHP, MySQL, routing, SSL, Mailpit, and Site Shell. The devkit owns project source, agent instructions, verification commands, sync, WP-CLI wrappers, and deployable plugin ZIPs.

Start by downloading the LocalWP devkit ZIP from your OhMyEtch account:

oh-my-idetch-localwp-devkit-<version>.zip

Extract it once, keep it as a long-lived workspace, and create one project folder per LocalWP site.

Mental Model​

The devkit has two surfaces:

SurfacePurpose
Devkit rootShared commands, generated agent instructions, project templates, and package scripts. Open this folder in your agent.
projects/<slug>The source of truth for one website: PHP site builders, CMS JSON, project notes, tests, reports, and project ZIP output.

The Local site receives only a synced runtime plugin copy at:

wp-content/plugins/oh-my-idetch

Do not edit that synced plugin copy as your source. Edit the project under projects/<slug>, check it, sync it, then verify in LocalWP.

What Is Not Bundled​

The devkit does not include premium or user-owned runtime files. Install these in your own Local site when your project needs them:

DependencyOwnership
EtchUser-owned runtime plugin.
Etch ThemeUser-owned theme/runtime dependency.
OhMyEtchUser-owned component plugin.
AutomaticCSSUser-owned styling system.
ACF Pro or other CMS field pluginsUser-owned CMS dependency.
Local BlueprintsPrivate user-created Local artifacts, not Oh My IDEtch release artifacts.

Use bun run localwp:doctor -- --project <slug> and bun run localwp:capabilities -- --project <slug> before assuming those runtime capabilities are available.

Typed Builder Authoring​

All Etch presentation is authored with the typed PHP builders from the Composer package honestlydesign/etch-builders, pinned per devkit release. Devkit 1.1.0 ships with etch-builders 2.1.1. Fluent builders compose blocks, styles, loops, components, and CMS-backed content, and their guardrails reject lazy HTML dumps before anything reaches WordPress. The project template ships runnable builder examples under examples/builders/.

The Core Loop​

Every project change follows the same order:

bun run project:check -- --project <slug>
bun run localwp:sync -- --project <slug>
bun run localwp:verify -- --project <slug>

The check lints PHP, runs PHPStan, and compiles the project site definition without writing to WordPress. The check must run before sync: the Local site never receives unchecked project source. After a successful sync, localwp:verify runs a fast read-only runtime check of compiled digests, recorded ownership, required capabilities, and the installed Builder contract.

Sync and verify also print site notices: things that need a person but never fail the command, such as content you removed from code or a style copy made in the Etch editor. See Content Ownership for what to do with them.

For deeper inspection, use the browser, WordPress admin, or WP-CLI:

bun run localwp:wp -- --project <slug> -- plugin list

Start Here​

  1. Install and Prepare explains what to install before opening the devkit in an agent.
  2. First Project walks through /new-project and manual setup commands.
  3. Daily Workflow covers the build, check, sync, and verify loop.
  4. Content Ownership explains hand-over to editors, adopting existing pages, and content removed from code.
  5. Ship a Plugin ZIP explains the production ZIP and how to take a project live.
  6. Command Reference lists every devkit command.
  7. Troubleshooting covers the common blockers.