An AI-powered chat interface for WordPress. Bring your own API key or connect to a local LLM.
- Multiple LLM Providers: Anthropic (Claude), OpenAI, and local models via Ollama/LM Studio
- Tool System: Execute PHP, read/write/edit files, query the database, manage plugins and themes
- Git-Compatible Change Tracking: All AI modifications are tracked using a git-compatible structure in
wp-content - Revert & Reapply: Undo any AI change and optionally reapply it later
- Patch Export/Import: Download changes as
.patchfiles or apply patches from elsewhere - Portable History: Download your Playground zip with full git history intact for local git operations
- Conversation History: Persistent storage with automatic summarization
- Streaming Responses: Real-time output as the AI generates responses
- Settings Persistence: Configuration stored in localStorage, surviving Playground restarts
- WordPress 6.0+
- PHP 7.4+
- An API key for Anthropic or OpenAI, or a locally running Ollama/LM Studio instance
- Upload the plugin to
/wp-content/plugins/ai-assistant - Activate through the Plugins menu
- Configure your API keys in Settings > AI Assistant
Go to Settings > AI Assistant to configure:
- Provider: Choose between Anthropic, OpenAI, or Local (Ollama/LM Studio)
- Model: Select which model to use
- API Keys: Enter your provider API keys
- Local Endpoint: Configure Ollama/LM Studio endpoint (default:
http://localhost:11434)
The AI Assistant panel appears in the WordPress admin screen meta area (alongside Help and Screen Options). Click to expand and start chatting.
| Tool | Description |
|---|---|
read_file |
Read file contents from wp-content |
write_file |
Create new files (use edit_file for modifications) |
edit_file |
Edit existing files via search/replace operations |
delete_file |
Delete files |
find |
Find files (by path/glob) or search file contents |
run_php |
Execute PHP code in the WordPress environment |
environment_info |
Get active plugins, themes, WP/PHP versions |
db_query |
Execute SELECT/DESCRIBE/SHOW queries on the database |
install_plugin |
Install a plugin from WordPress.org |
ability |
List, inspect, or execute WordPress abilities (plugin-exposed actions) |
navigate |
Navigate the browser to a URL within the site |
get_page_html |
Get HTML of elements on the current page |
skill |
Load skill documents with specialized WordPress knowledge |
summarize_conversation |
Generate a summary of the current conversation |
When using a local LLM (Ollama, LM Studio), tools are tiered to avoid overwhelming smaller models:
- Core tools (always available):
read_file,write_file,edit_file,find,run_php,environment_info - Extended tools (enabled on demand):
delete_file,db_query,install_plugin,ability,navigate,get_page_html,summarize_conversation,skill
The model can call enable_tools to activate specific extended tools when it needs them. Cloud providers (Anthropic, OpenAI) receive all tools upfront.
Enable the YOLO checkbox to skip confirmation dialogs for tool execution. Use with caution.
Find this under Tools > AI Changes. Every file the AI creates or modifies is tracked using a git-compatible structure stored in wp-content/.git.
- View diffs: Click any file to see exactly what changed
- Commit history: Browse individual commits with expandable diffs
- Revert: Restore any file to its original state, or revert to a specific commit
- Reapply: Re-apply previously reverted changes
- Export: Select files and download a unified
.patchfile - Import: Apply patch files to your installation
- PHP Linting: Automatic syntax checking for PHP files
- Git-compatible: Download your Playground zip and use standard git commands locally
- Plugin ZIP downloads: Modified plugins get a "Download ZIP" link on the Plugins page
When you download your Playground as a ZIP, the wp-content folder contains a full git repository with two branches:
- main: The original state before AI modifications
- ai-changes: Each AI modification as a separate commit with a descriptive message
Each file change creates its own commit with a message describing why the change was made (e.g., "Add form validation", "Fix login redirect bug"). To explore:
cd wp-content
git log --oneline ai-changes # See all AI commits
git diff main..ai-changes # See all changes at once
git show <commit-sha> # Inspect a specific changeThis makes it safe to experiment—you can always undo what the AI did.
If the AI writes code that breaks WordPress (e.g., a PHP syntax error), the assistant detects consecutive failed requests and warns you that something is wrong—while the current page still works.
To recover:
- Click the grid icon in the Playground top bar
- Select Recovery Mode to boot into troubleshooting mode
- Activate the AI Assistant plugin and go to Tools → AI Changes
- Revert the problematic changes
The recovery screen highlights recently modified plugins to help identify the culprit.
Other plugins can expose their functionality to the AI by registering WordPress Abilities. See docs/plugin-integration.md for a full guide.
To run the plugin locally using WordPress Playground:
npx @wp-playground/cli server --auto-mountThis starts a local WordPress Playground instance and automatically mounts the plugin directory, so any changes you make to the source files are reflected immediately.
GPL-2.0-or-later. See LICENSE for details.
