/wp-db-migrate:ls-wp-db-preparefrom wp-db-migrate
Sanitise a MySQL or MariaDB WordPress dump for local Studio import. Use for SQL compatibility findings, table exclusions, prefix changes or preserving local accounts.
Ships in wp-db-migrate. 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.
Read the parent skill for the shared operating contract. Resolve
this sub-skill's directory (in Claude Code, ${CLAUDE_SKILL_DIR}) and go up two
levels to the repository root. Set REPO to that absolute path in the command
examples. Never assume the current working directory is this checkout.
Run preflight if the dump's tables, URLs or target
prefix have not been inspected. Set DUMP, SITE and a new absolute OUTPUT path.
node "$REPO/lib/sql-tool.cjs" sanitise "$DUMP" \
--studio-site "$SITE" --out "$OUTPUT" --json
This writes a new MySQL-format dump and reports edits/findings. The original is
preserved. Read the result even when the exit code is 1; stop on blocking findings.
Do not overwrite a previous output or use --force without resolving its ownership.
Select optional flags from the user's needs and the actual table inventory:
--exclude 'actionscheduler_logs' (repeatable, or comma-separated): match the
full table name or its unprefixed name; quote wildcard patterns. Report matches
and impact before importing. Resolve exclusions that remove required content.--prefix wp_: rename imported tables to the confirmed target prefix; do not
guess the prefix, especially for multisite or mixed-prefix exports.--keep-users: leave the export's users/usermeta out so the local accounts
survive. This does not mean import source accounts. Ensure imported tables
use the target prefix, as the tool requires.--keep-wordfence when the user requires those tables.Foreign keys added by ALTER TABLE ... ADD CONSTRAINT ... FOREIGN KEY (phpMyAdmin
writes these at the end of a dump, for example WooCommerce's wc_download_log)
are always removed, because SQLite cannot add them to an existing table and
Studio rolls back the whole import. The report lists each as a foreign-key edit.
MariaDB-only table options (PAGE_COMPRESSED, PAGE_COMPRESSION_LEVEL,
ENCRYPTED, ENCRYPTION_KEY_ID, PAGE_CHECKSUM, TRANSACTIONAL) are also
always removed, because Studio's SQLite driver cannot parse them. They only
change how MariaDB stores the table. The report lists each as a table-option edit.
An integer-too-large finding means a bigint unsigned column holds a value
above 9223372036854775807, which SQLite cannot store; Studio stops the import at
that INSERT. Do not edit the values. Ask the user whether to leave the table out
with --exclude, and report it as a blocking finding until they decide.
Record the input hash, output path, edits, excluded tables and unresolved findings from the tool's report. Sanitisation does not anonymise personal/customer data. Continue to migrate only if import is requested.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub lightspeedwp/ls-wp-db-migrate --plugin wp-db-migrate6 skills in this plugin
/ls-wp-db-migratePrepare and migrate MySQL or MariaDB WordPress exports into local WordPress Studio sites, including table analysis, sanitisation, URL replacement, verification and failed-import recovery. Use for staging-to-local database workflows, not remote deployments or file/media synchronisation./ls-wp-db-migrate-importBack up and import a prepared WordPress MySQL-format dump into a local Studio site. Use when an actual local database import is requested, after compatibility and exclusion review./ls-wp-db-preflightInspect WordPress SQL exports and local Studio prerequisites before migration. Use for dependency checks, table inventories, source URLs and prefix compatibility without importing data.Other plugins' skills for the same job