Safety Model
SEO operations can affect traffic, indexing, and revenue. wp-seo-ops is designed to make risky operations reviewable before they are applied.
Risk Categories
| Operation Type | Examples | Risk |
|---|---|---|
| Read-only | meta get, meta list, audit full, redirect list | Low |
| Write | meta set, meta import, meta bulk, redirect add, redirect import | Medium |
| Delete | meta delete, redirect delete | High |
| External submit | instant-indexing submit | Medium |
Dry Run First
Use --dry-run before applying write-heavy changes:
seo-ops meta set 123 title "New title" --path=/var/www/html --dry-run
seo-ops meta import metadata.csv --path=/var/www/html --dry-run
seo-ops meta bulk updates.csv --path=/var/www/html --dry-run
seo-ops redirect import redirects.csv --path=/var/www/html --dry-run
Dry-run output should be reviewed like a deployment plan.
Confirm Deletes
Delete commands require explicit confirmation unless --yes is passed.
Interactive confirmation:
seo-ops redirect delete /old-page --path=/var/www/html
Non-interactive automation:
seo-ops redirect delete /old-page --path=/var/www/html --yes
Only use --yes in scripts when the input has already been validated. Prefer --dry-run in the same pipeline before applying changes.
Backup Before Batch Changes
Before imports, bulk updates, or redirect migrations, export the current state:
seo-ops meta export --path=/var/www/html --output=meta-backup.csv
seo-ops redirect export --path=/var/www/html --output=redirects-backup.csv
These files give you a rollback reference even if rollback is performed manually.
Prefer Small Batches
For large sites, split changes into small CSV batches:
batch-001.csv
batch-002.csv
batch-003.csv
Apply and validate one batch at a time:
seo-ops meta bulk batch-001.csv --path=/var/www/html --dry-run
seo-ops meta bulk batch-001.csv --path=/var/www/html
seo-ops audit meta-check --path=/var/www/html --format=table
Recommended Change Process
- Export current metadata or redirects.
- Run the planned command with
--dry-run. - Review output manually or in CI.
- Apply the command without
--dry-run. - Run a validation command.
- Save the audit or CSV output with your deployment notes.
Production Checklist
Before running production writes:
- Confirm
--pathpoints to the intended WordPress installation. - Confirm the detected SEO plugin matches expectation.
- Export existing metadata or redirects.
- Run
--dry-run. - Use small CSV batches for large updates.
- Validate with
audit meta-check,redirect list, or directmeta getcalls.