/wp-skills:studio-debugfrom wp-skills
Debug WordPress Studio local sites — inspect SQLite database, check logs, troubleshoot plugins/themes, and diagnose common issues in the Studio local environment.
Ships in wp-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are helping the user debug a WordPress site running in the WordPress Studio local environment.
sqlite-database-integration mu-pluginwp-content/database/.ht.sqliteIdentify the site directory
wp-config.php and wp-content/database/.ht.sqlite to confirm it's a Studio siteUnderstand the problem
Gather diagnostics (run relevant checks in parallel where possible)
wp-content/debug.log if it existsdefine('WP_DEBUG', true) and define('WP_DEBUG_LOG', true) in wp-config.phpsqlite3 CLI to query the SQLite database directly:
sqlite3 wp-content/database/.ht.sqlite
.tables — list all tablesSELECT option_name, option_value FROM wp_options WHERE option_name IN ('siteurl', 'home', 'active_plugins', 'stylesheet', 'template'); — core site settingsSELECT option_name, option_value FROM wp_options WHERE option_name = 'active_plugins'; — check active plugins (PHP serialized)PRAGMA integrity_check; — check database healthPRAGMA table_info(wp_options); — inspect table schema-readonly flag when just readingwp-content/database/.ht.sqlite active_plugins option to see what's activewp-content/plugins/ for installed pluginswp-content/themes/ for installed themeswp-config.php for misconfigurationsDB_DIR and DB_FILE constants if presentwp-content/mu-plugins/ for the SQLite integration plugin fileswp-content/db.php drop-in — this is critical for SQLite to workwp-content/database/ directory exists and is writable.ht.sqlite file size (0 bytes = likely corrupted/empty).ht.sqlite-journal or .ht.sqlite-wal files (WAL mode indicators)Diagnose and report
Fix (if requested)
UPDATE wp_options SET option_value = 'a:0:{}' WHERE option_name = 'active_plugins';
UPDATE wp_options SET option_value = 'twentytwentyfive' WHERE option_name = 'stylesheet';
UPDATE wp_options SET option_value = 'twentytwentyfive' WHERE option_name = 'template';
.ht.sqlite-journal filesPRAGMA integrity_check;wp_options for permalink_structure.htaccess or rewrite rules (Studio handles this internally)active_plugins from wp_optionsWhen a site won't start and you suspect a plugin conflict, run the plugin bisect script to automatically find the offending plugin(s). This deactivates each active plugin one at a time, attempts to start the site, and reports which plugin(s) are preventing the site from starting.
bash /tmp/studio-bisect.shBisect script:
#!/bin/bash
# This script deactivates all active plugins one by one and checks if the site starts successfully after each deactivation.
set -euo pipefail
echo "Fetching active plugins..."
raw_output=$(studio wp plugin list --status=active --fields=name --format=json 2>/dev/null || true)
# Extract the JSON array from the noisy output (find the first [...] block)
json=$(echo "$raw_output" | grep -oE '\[.*\]' | head -1)
if [[ -z "$json" ]]; then
echo "❌ Failed to parse plugin list. Raw output:"
echo "$raw_output"
exit 1
fi
# Parse plugin names from JSON
plugins=()
while IFS= read -r line; do
plugins+=("$line")
done < <(echo "$json" | python3 -c "
import sys, json
data = json.load(sys.stdin)
for p in data:
print(p['name'])
")
if [[ ${#plugins[@]} -eq 0 ]]; then
echo "❌ No active plugins found."
exit 1
fi
echo "Found ${#plugins[@]} active plugins:"
printf " - %s\n" "${plugins[@]}"
echo ""
conflicting=()
for plugin in "${plugins[@]}"; do
echo "=========================================="
echo "Testing: $plugin"
echo "=========================================="
echo "⏸ Deactivating $plugin..."
if ! studio wp plugin deactivate "$plugin" 2>/dev/null; then
echo "⚠️ Failed to deactivate $plugin, skipping."
continue
fi
echo "🚀 Starting site..."
if studio site start 2>/dev/null; then
echo ""
echo "🎯 Conflicting plugin found: $plugin"
conflicting+=("$plugin")
echo "🛑 Stopping site..."
studio site stop 2>/dev/null || true
else
echo "❌ Site still fails without $plugin."
fi
echo "🔄 Reactivating $plugin..."
studio wp plugin activate "$plugin" 2>/dev/null || true
echo ""
done
echo "=========================================="
echo "RESULTS"
echo "=========================================="
if [[ ${#conflicting[@]} -gt 0 ]]; then
echo "🎯 Conflicting plugins found (${#conflicting[@]}):"
for p in "${conflicting[@]}"; do
echo " ❌ $p"
done
else
echo "✅ No single conflicting plugin found."
echo " The issue may involve multiple plugins interacting."
fi
To run: save to a temp file and execute with bash /tmp/studio-bisect.sh
siteurl and home from wp_optionsThe SQLite translation layer can cause issues that wouldn't appear with MySQL:
To check for translation errors:
SELECT * FROM _mysql_data_types_cache LIMIT 20;
-readonly flag with sqlite3 when only reading dataWhat SKILL.md sets; muted values are Claude Code's defaults
2 plugins ship this exact skill · first indexed Jul 8, 2026
Other plugins' skills for the same job
3 skills in this plugin
/studio-cliThis skill should be used when the user asks to "create a WordPress site", "start a local WordPress site", "develop a WordPress plugin", "develop a WordPress theme", "share a preview site", "preview my site", "send a site to a client", "publish to WordPress.com", "run WP-CLI", "configure WordPress site", "set up custom domain", "enable HTTPS", "change PHP version", "create site with blueprint", "manage local WordPress sites", "list my sites", "stop a site", "delete a site", "debug WordPress with Xdebug", "set up WooCommerce locally", "export or import WordPress content", "run a database query", or mentions Studio CLI, local WordPress development, or WordPress Playground. Covers site lifecycle, preview sharing, WP-CLI integration, blueprints, and debugging.
/wp-core-contributingThis skill should be used when the user asks to "contribute to WordPress core", "fix a WordPress bug", "create a Trac patch", "contribute to Gutenberg", "find a good first bug", "submit a WordPress patch", "work on WordPress core", "set up a core development environment", "WordPress core development", "fix a Gutenberg issue", "create a PR for Gutenberg", "find good first issues", "work on a Trac ticket", "test a WordPress patch", "review a WordPress patch", or mentions WordPress core contributions, Trac patches, or Gutenberg PRs. Covers both Trac (core) and GitHub (Gutenberg) contribution workflows using Studio CLI.
Claude Code refuses to install this plugin
.claude-plugin/plugin.json: skills.0: Invalid string: must start with "./"
Checked against Claude Code 2.1.332's install rules. The listing below is what the repository ships; Claude Code cannot install it as published.