wp-cli-local

Run WP-CLI commands against any Local by Flywheel site. Use when the user says 'wp-cli', 'run wp', 'use wp-cli', 'activate plugin', 'deactivate plugin', 'flush cache', 'wp option', 'wp transient', 'wp db', 'wp eval', 'wp cron', 'wp rewrite', or any request involving WordPress CLI commands.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "wp-cli-local" with this command: npx skills add soderlind/wp-cli-local/soderlind-wp-cli-local-wp-cli-local

WP-CLI for Local by Flywheel

Run WP-CLI commands against Local sites using the wrapper script bundled with this skill.

Never run bare wp commands. Always use the wrapper:

bash {{SKILL_DIR}}/scripts/wp <wp-cli-command...>

Site Detection

The wrapper auto-detects the site by matching the current working directory against site paths in Local's sites.json. No site name argument is needed when the terminal is inside a Local site directory.

WP="bash {{SKILL_DIR}}/scripts/wp"

# Auto-detect (CWD must be inside a Local site directory)
$WP plugin list
$WP core version

# Explicit site override
$WP --site=my-site plugin list

# List all sites with running/halted status
$WP --list

If auto-detection fails (CWD is not inside any Local site) and no --site= is given, the script prints available sites. Ask the user which site to target, or use --site=<name>.

Requirements

  • macOS (Apple Silicon or Intel)
  • Local by Flywheel installed with sites in ~/Library/Application Support/Local/sites.json
  • WP-CLI installed and available in PATH (e.g. via brew install wp-cli)
  • The target site must be running in Local (the site-specific php.ini only exists at runtime)

Common Commands

WP="bash {{SKILL_DIR}}/scripts/wp"

# Plugin management
$WP plugin list
$WP plugin activate <slug>
$WP plugin deactivate <slug>
$WP plugin status <slug>

# Cache / transients
$WP cache flush
$WP transient delete --all

# Options
$WP option get <key>
$WP option update <key> <value>
$WP option list --search="<pattern>"

# Database
$WP db query "SELECT * FROM wp_options WHERE option_name LIKE '<pattern>%' LIMIT 10;"
$WP db export backup.sql
$WP db import backup.sql

# Eval PHP
$WP eval 'echo get_option("siteurl");'
$WP eval-file script.php

# Rewrites / cron
$WP rewrite flush
$WP cron event list
$WP cron event run <hook>

# User / site info
$WP user list
$WP option get siteurl
$WP core version

Note: The AI agent should always use the wrapper script, not direnv. The direnv setup is a convenience for the user's own interactive terminal sessions.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

browser-native

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

Podfetcher Tools

Search podcasts, browse episodes, and fetch podcast transcripts from Podfetcher using the bundled Node.js CLI, SDK, or MCP server.

Registry SourceRecently Updated
Coding

Code Reviewer Cn

代码审查、重构建议、安全漏洞检查、命名规范、复杂度分析、注释文档生成. Use when you need code reviewer cn capabilities. Triggers on: code reviewer cn, 圈复杂度估算, 嵌套深度检测, 命名风格一致性, 注释率计算与评级, 重复行检测.

Registry SourceRecently Updated
Coding

Encode

Encode - command-line tool for everyday use

Registry SourceRecently Updated