skills/bwbama85/wp-migrate/SKILL.md
WordPress site migration and deployment using wp-migrate.sh. Use when migrating WordPress sites, syncing databases, managing backups, testing migrations, debugging migration issues, or working with WordPress deployment workflows including Duplicator, Jetpack Backup, and Solid Backups archives. Also use for code modifications, testing, git workflows, PR creation, and release management for this project.
npx skillsauth add aiskillstore/marketplace wp-migrateInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill provides expertise for working with the wp-migrate.sh WordPress migration tool.
wp-migrate.sh is a comprehensive WordPress migration tool that operates in two modes:
Current Version: Check the latest release
git describe --tags --abbrev=0 # Get current version from git
Latest Release: See GitHub Releases
Repository: BWBama85/wp-migrate.sh
Main Branch: main
Push Mode:
./wp-migrate.sh --dest-host [email protected] --dest-root /var/www/site
Archive Mode:
./wp-migrate.sh --archive /path/to/backup.zip
./wp-migrate.sh --archive /path/to/backup.tar.gz --archive-type jetpack
Dry Run:
./wp-migrate.sh --dest-host user@dest --dest-root /var/www/site --dry-run --verbose
Rollback (v2.6.0):
./wp-migrate.sh --rollback # Auto-detects latest backups
./wp-migrate.sh --rollback --rollback-backup /path/to/specific/backup # Specific backup
./wp-migrate.sh --rollback --yes # Skip confirmation for automation
Automation-Friendly (v2.6.0):
./wp-migrate.sh --archive /path/to/backup.zip --yes --quiet # CI/CD: skip prompts, no progress bars
Run all tests:
make test
Run specific test:
./test-wp-migrate.sh
ShellCheck validation:
shellcheck wp-migrate.sh
The project uses a modular source structure:
src/
├── header.sh # Shebang, defaults, variable declarations
├── lib/
│ ├── core.sh # Core utilities (log, err, validate_url)
│ ├── functions.sh # All other functions
│ └── adapters/ # Archive format adapters
│ ├── README.md
│ ├── duplicator.sh
│ ├── jetpack.sh
│ └── solidbackups.sh
└── main.sh # Argument parsing and main execution
IMPORTANT: Modifications should be made in src/ files, NOT in wp-migrate.sh directly.
After modifying source files:
make build
This will:
A pre-commit hook prevents committing source changes without rebuilding:
ln -s ../../.githooks/pre-commit .git/hooks/pre-commit
Branching: Create from main using descriptive names:
feature/<slug> for enhancementsfix/<slug> for bug fixesdocs/<slug> for documentationchore/<slug> for maintenanceCommits: Use .gitmessage template format:
type: short imperative summary
Longer explanation if needed
Types: feat, fix, docs, chore, refactor, test
Changelog: Update CHANGELOG.md under [Unreleased] section with every feature or fix
Pull Requests:
Merging: Keep main release-ready with git merge --no-ff or squash after review
Releases: Tag with semantic versioning (e.g., git tag v2.7.0)
When creating PRs, ensure:
git log main..HEAD and git diff main...HEAD)Permission Errors on Managed Hosts (StellarSites)
--stellarsites flag to exclude protected mu-pluginsstellarsites-cloud)Database Import Fails
URL Search-Replace Issues
--verbose to see detected URLs--dest-home-url or --dest-site-url if detection fails--no-search-replace for faster migrations that only need home/siteurl updatedArchive Detection Fails
--archive-type to specify format (duplicator, jetpack, solidbackups)Non-Interactive Context Failures (v2.6.0)
--yes flag when running in CI/CD, cron, or pipeline contextsRollback Issues (v2.6.0)
--rollback-backup /path/to/backup to specify explicitlySSH Connection Issues
--ssh-opt (can be repeated)--ssh-opt 'Port=2222' or --ssh-opt 'ProxyJump=bastion'ShellCheck Errors
brew install shellcheck (macOS) or see https://www.shellcheck.net/shellcheck wp-migrate.shShow verbose migration preview:
./wp-migrate.sh --dest-host user@dest --dest-root /var/www/site --dry-run --verbose
Show every command (trace mode):
./wp-migrate.sh --dest-host user@dest --dest-root /var/www/site --dry-run --trace
Check archive structure:
unzip -l /path/to/backup.zip | head -50
tar -tzf /path/to/backup.tar.gz | head -50
Verify wp-cli on destination:
ssh user@dest 'cd /var/www/site && wp core version'
The script uses an extensible adapter system for different backup formats.
dup-installer/dup-database__*.sql structuresql/*.sql multi-file structurewp-content/uploads/backupbuddy_temp/{ID}/See src/lib/adapters/README.md for contributor guide.
Each adapter must implement:
validate_<adapter>() - Check if file matches formatextract_<adapter>() - Extract archive to temp directorydetect_db_<adapter>() - Find database file(s)detect_wp_content_<adapter>() - Find wp-content directorymake build after any source changes to regenerate wp-migrate.shUse Grep tool for code searches:
pattern: "function_name"
output_mode: "content"
-n: true (show line numbers)
Use Read tool for file contents:
file_path: /Volumes/personal/codeprojects/bash/wp-migrate/src/lib/functions.sh
Use Edit tool for precise changes:
file_path: /Volumes/personal/codeprojects/bash/wp-migrate/src/lib/functions.sh
old_string: "exact match from file"
new_string: "replacement text"
git status
git diff main...HEAD # See all changes in branch
git log main..HEAD # See all commits in branch
make build after source changesdevelopment
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.