# wp-env

Configures and manages Docker-based WordPress environments using @wordpress/env. Useful when you need a real MySQL database, WP-CLI, or PHPUnit testing.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 679 installs · ★ 2298
- Author: WordPress
- License: LicenseRef-Unknown · policy=link-only · description only; the file stays with the author
- Source: https://github.com/WordPress/agent-skills/tree/HEAD/skills/wp-env/SKILL.md
- Updated: 2026-10-21
- HTML: https://affpapa.org/en/nevibecode/skills/wp-env

## What it does

The skill guides your agent through setting up and troubleshooting local WordPress environments via `@wordpress/env`. It detects plugins, themes, or core checkouts from the folder structure and handles configurations defined in `.wp-env.json` and `.wp-env.override.json`.

Commands execute inside dedicated containers such as `cli`, `wordpress`, or `mysql`. This approach keeps real MySQL data intact between restarts and provides shell access through `wp-env run`. Keep Docker running before triggering any commands, or the setup halts immediately.

You need Node.js 18.12.0 or newer alongside an active Docker installation. Bare plugin slugs from WordPress.org will fail in the configuration file; you must provide direct ZIP download URLs or GitHub paths instead.

## Requirements
- Works with: Docker

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add WordPress/agent-skills --skill wp-env -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/wp-env/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/wp-env/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add WordPress/agent-skills --skill wp-env -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/wp-env/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add WordPress/agent-skills --skill wp-env -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/wp-env/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install WordPress/agent-skills wp-env
```

2. **Manually: put the files in place**
- File: `.github/skills/wp-env/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add WordPress/agent-skills --skill wp-env -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/WordPress/agent-skills --path skills/wp-env
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/wp-env/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add WordPress/agent-skills --skill wp-env -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/WordPress/agent-skills/tree/HEAD/skills/wp-env/SKILL.md

## When to use it
- spin up a Docker-based WordPress instance for plugins or themes
- run PHPUnit test suites against a persistent MySQL database
- execute WP-CLI commands inside the environment container
- configure Xdebug on port 9003 for PHP troubleshooting

## Example prompts
- Start a local WordPress environment with wp-env and enable Xdebug
- Run PHPUnit tests inside the wp-env container
- Reset the wp-env development database

## Similar
- [ddev-expert](https://affpapa.org/en/nevibecode/skills/ddev-expert.md) — skill · 314 installs
- [managing-astro-local-env](https://affpapa.org/en/nevibecode/skills/managing-astro-local-env.md) — skill · 1400 installs
- [docker-sandboxes-env](https://affpapa.org/en/nevibecode/skills/docker-sandboxes-env.md) — skill · 725 installs
- [coolify-manager](https://affpapa.org/en/nevibecode/skills/coolify-manager.md) — skill · 502 installs
- [wordpress-testing-qa](https://affpapa.org/en/nevibecode/skills/wordpress-testing-qa.md) — skill · 413 installs
- [wordpress-pro](https://affpapa.org/en/nevibecode/skills/wordpress-pro.md) — skill · 9700 installs

From the same set: [wordpress/agent-skills](https://affpapa.org/en/nevibecode/by/wordpress/agent-skills.md) — 19 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
