woo-deploy

Deploy WooCommerce — WP-CLI automation, database migrations, zero-downtime updates, staging workflows, environment configuration, and CI/CD patterns. Use when deploying WooCommerce stores or setting up deployment pipelines.

17 stars

Best use case

woo-deploy is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Deploy WooCommerce — WP-CLI automation, database migrations, zero-downtime updates, staging workflows, environment configuration, and CI/CD patterns. Use when deploying WooCommerce stores or setting up deployment pipelines.

Teams using woo-deploy should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/woo-deploy/SKILL.md --create-dirs "https://raw.githubusercontent.com/OrcaQubits/agentic-commerce-skills-plugins/main/dist/antigravity/woocommerce-commerce/.agent/skills/woo-deploy/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/woo-deploy/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How woo-deploy Compares

Feature / Agentwoo-deployStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Deploy WooCommerce — WP-CLI automation, database migrations, zero-downtime updates, staging workflows, environment configuration, and CI/CD patterns. Use when deploying WooCommerce stores or setting up deployment pipelines.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# WooCommerce Deployment

## Before writing code

**Fetch live docs**:
1. Fetch `https://developer.wordpress.org/cli/commands/` for WP-CLI reference
2. Web-search `woocommerce deployment best practices` for deployment patterns
3. Web-search `wordpress deployment ci cd` for CI/CD integration

## WP-CLI

### Essential WordPress Commands

| Command | Description |
|---------|-------------|
| `wp core update` | Update WordPress core |
| `wp plugin update --all` | Update all plugins |
| `wp plugin install <slug> --activate` | Install and activate plugin |
| `wp plugin deactivate <slug>` | Deactivate plugin |
| `wp db export backup.sql` | Export database |
| `wp db import backup.sql` | Import database |
| `wp cache flush` | Flush object cache |
| `wp rewrite flush` | Flush permalink rules |
| `wp search-replace <old> <new>` | Database search-replace (for migrations) |
| `wp cron event run --all` | Run all due cron events |

### WooCommerce-Specific Commands

| Command | Description |
|---------|-------------|
| `wp wc update` | Run WooCommerce database updates |
| `wp wc product list` | List products |
| `wp wc order list` | List orders |
| `wp wc customer list` | List customers |
| `wp wc setting list <group>` | View settings |
| `wp wc tool run <tool>` | Run WooCommerce tool (install_pages, etc.) |

### Scripted Deployment

```bash
# Deploy steps
wp maintenance-mode activate
wp db export pre-deploy-backup.sql
wp plugin update woocommerce
wp wc update                        # Run DB migrations
wp cache flush
wp rewrite flush
wp maintenance-mode deactivate
```

## Database Migrations

### WooCommerce Update Routine

When WooCommerce updates:
1. New version includes migration callbacks
2. `wp wc update` executes pending migrations
3. Migrations are versioned and idempotent
4. Track in `woocommerce_db_version` option

### Custom Extension Migrations

For your own plugin's schema changes:
- Store a `db_version` option
- On `plugins_loaded`, compare stored vs current version
- Run migration if needed using `dbDelta()` for CREATE/ALTER
- Update the stored version

### HPOS Migration

Migrate orders from posts to custom tables:
- WooCommerce > Settings > Advanced > Features
- Use the built-in migration tool (batched, resumable)
- Enable sync mode during transition
- Verify data integrity before switching authoritative source

## Environment Configuration

### wp-config.php Constants

| Constant | Purpose |
|----------|---------|
| `WP_DEBUG` | Enable debug mode |
| `WP_DEBUG_LOG` | Log errors to wp-content/debug.log |
| `SAVEQUERIES` | Log DB queries (dev only) |
| `WP_ENVIRONMENT_TYPE` | `local`, `development`, `staging`, `production` |
| `DISALLOW_FILE_EDIT` | Disable admin file editor |
| `DISALLOW_FILE_MODS` | Disable plugin/theme updates via admin |
| `FORCE_SSL_ADMIN` | Force HTTPS for admin |

### Environment Detection

`wp_get_environment_type()` returns the current environment type. Use for conditional behavior (debug output, test gateways, etc.).

## Staging & Production Workflow

### Recommended Flow

1. **Local** — develop and test
2. **Staging** — mirror production, final QA
3. **Production** — live store

### Database Migration Between Environments

- Export: `wp db export`
- Import: `wp db import`
- URL replacement: `wp search-replace 'https://staging.example.com' 'https://example.com' --all-tables`
- Always backup before replacing

### What NOT to Sync

- Active sessions and transients — they're environment-specific
- Payment gateway live keys (use environment-specific config)
- Email notification settings (avoid sending test emails from staging)

## CI/CD Patterns

### GitHub Actions / GitLab CI

Typical pipeline:
1. **Lint** — PHP_CodeSniffer with WPCS
2. **Unit Tests** — PHPUnit against WordPress test suite
3. **Integration Tests** — PHPUnit with WooCommerce loaded
4. **E2E Tests** — Playwright against test environment
5. **Deploy** — rsync/SSH or platform-specific deployer

### Deployment Methods

| Method | Description |
|--------|-------------|
| **Git-based** | Push to remote, server pulls (Bedrock/Trellis) |
| **rsync/SSH** | Sync files to server |
| **Platform CLI** | WP Engine, Pantheon, Kinsta, Flywheel |
| **Docker** | Build and deploy container images |
| **Composer** | Install/update via Composer on server |

## Maintenance Mode

- `wp maintenance-mode activate` — enable maintenance mode
- `wp maintenance-mode deactivate` — disable
- Or programmatic: create `.maintenance` file in WordPress root
- Custom maintenance page: `wp-content/maintenance.php`

## Best Practices

- Always backup before deploying (`wp db export`)
- Run `wp wc update` after WooCommerce version updates
- Use `wp search-replace` for URL changes between environments
- Set `WP_ENVIRONMENT_TYPE` per environment
- Disable file editing in production (`DISALLOW_FILE_EDIT`)
- Use maintenance mode during major updates
- Test updates on staging before production
- Automate deployments with CI/CD pipelines
- Keep deployment scripts in version control

Fetch the WP-CLI documentation and WordPress deployment guides for exact command syntax, flags, and platform-specific deployment patterns before implementing.

Related Skills

spree-deployment

17
from OrcaQubits/agentic-commerce-skills-plugins

Deploy Spree to production — PostgreSQL + Redis + Sidekiq stack, Docker multi-arch images on GHCR, the `spree-starter` Dockerfile + Compose, Heroku/Render/Fly.io/AWS targets, env-var conventions, RAILS_MASTER_KEY, asset precompilation (Tailwind 4 + Propshaft), Action Cable, MeiliSearch indexing, S3 / ActiveStorage for media, log/observability setup, zero-downtime deploys, and migration strategy. Use when going from local dev to production, scaling Spree, or troubleshooting deploys.

saleor-deploy

17
from OrcaQubits/agentic-commerce-skills-plugins

Deploy Saleor to production — Docker setup, Saleor Cloud, environment variables, Celery workers, S3 media storage, database management, and scaling. Use when deploying Saleor applications.

medusa-deploy

17
from OrcaQubits/agentic-commerce-skills-plugins

Deploy Medusa v2 to production — build process, server vs worker mode, environment variables, hosting options, Redis caching, database configuration, and production checklist. Use when deploying Medusa applications.

magento-deploy

17
from OrcaQubits/agentic-commerce-skills-plugins

Deploy Magento 2 — deployment modes, static content deployment, DI compilation, CLI commands, zero-downtime strategies, and CI/CD pipeline setup. Use when preparing for production deployment or building deployment automation.

woo-testing

17
from OrcaQubits/agentic-commerce-skills-plugins

Test WooCommerce extensions — PHPUnit unit/integration tests, WP test suite, WooCommerce test helpers, E2E with Playwright, and WP-CLI test scaffolding. Use when writing tests for WooCommerce plugins or setting up a test environment.

woo-shipping

17
from OrcaQubits/agentic-commerce-skills-plugins

Build WooCommerce shipping methods — WC_Shipping_Method, shipping zones, shipping classes, rate calculation, tracking, and integration with carriers. Use when creating custom shipping integrations or configuring shipping logic.

woo-setup

17
from OrcaQubits/agentic-commerce-skills-plugins

Install WooCommerce, configure the development stack, and set up a local dev environment with WP-CLI, Docker, or wp-env. Use when setting up a new WooCommerce project or development environment.

woo-security

17
from OrcaQubits/agentic-commerce-skills-plugins

Implement WooCommerce security — nonces, capabilities, input sanitization, output escaping, data validation, PCI compliance considerations, and WordPress security best practices. Use when hardening a WooCommerce store or reviewing security posture.

woo-plugin-dev

17
from OrcaQubits/agentic-commerce-skills-plugins

Create WooCommerce extensions/plugins — file structure, main plugin file, activation/deactivation hooks, custom database tables, autoloading, and WordPress plugin API. Use when building new WooCommerce extensions or structuring plugin code.

woo-performance

17
from OrcaQubits/agentic-commerce-skills-plugins

Optimize WooCommerce performance — object caching, transients, HPOS, database optimization, Action Scheduler, lazy loading, and query optimization. Use when improving store performance or diagnosing slowness.

woo-payments

17
from OrcaQubits/agentic-commerce-skills-plugins

Build WooCommerce payment gateways — WC_Payment_Gateway, direct/redirect/hosted integrations, tokenization, subscriptions support, refunds, and PCI compliance. Use when creating custom payment method integrations.

woo-hooks-filters

17
from OrcaQubits/agentic-commerce-skills-plugins

Master the WordPress hook system for WooCommerce — actions, filters, hook priorities, WooCommerce-specific hooks, and extensibility patterns. Use when adding functionality via hooks or understanding the WooCommerce execution flow.