Skip to main content

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 TypeExamplesRisk
Read-onlymeta get, meta list, audit full, redirect listLow
Writemeta set, meta import, meta bulk, redirect add, redirect importMedium
Deletemeta delete, redirect deleteHigh
External submitinstant-indexing submitMedium

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
danger

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
  1. Export current metadata or redirects.
  2. Run the planned command with --dry-run.
  3. Review output manually or in CI.
  4. Apply the command without --dry-run.
  5. Run a validation command.
  6. Save the audit or CSV output with your deployment notes.

Production Checklist

Before running production writes:

  • Confirm --path points 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 direct meta get calls.