# WP + Divi to AM Stack A Pipeline: SOP Index End-to-end playbook for converting any WordPress / Divi site backup (.wpress) into an Arising Media Stack A deployment: PHP router + SQLite + vanilla JS/CSS. ## Quick start (CLI launcher) ```bash python3 scripts/migrate.py --wpress /path/to/backup.wpress --domain example.com ``` Runs phases 0-6 automatically (extract, analyze, nav, content, media, stage seed). Prints agent breadcrumbs for phases 7-11. See `10-agent-breadcrumbs.md` for the complete ordered execution checklist. ## SOPs in this folder | File | Phase | Description | |------|-------|-------------| | `00-overview.md` | n/a | Pipeline overview, philosophy, what to extract vs not replicate | | `01-wpress-extraction.md` | 1 | .wpress binary format, extraction script, verification | | `02-database-analysis.md` | 2 | MySQL dump parsing, page inventory, Divi version detection | | `03-divi-content-extraction.md` | 3 | Divi 4 shortcodes vs Divi 5 blocks, extraction scripts | | `04-design-system-extraction.md` | 4 | Colors, fonts, spacing to tokens.css | | `05-content-migration.md` | 5-6 | Section remapping, content staging, seed_databases.py | | `06-media-assets.md` | 5 | Upload migration, WebP conversion, media manifest | | `07-seo-preservation.md` | 7 | Redirect map, Rank Math extraction, schema.org | | `08-run-order.md` | n/a | DEPRECATED. Superseded by `10-agent-breadcrumbs.md` | | `09-stack-a-output.md` | n/a | SQLite schemas, sections_json spec, Divi to AM module mapping | | `10-agent-breadcrumbs.md` | 0-11 | Ordered agent execution checklist (.wpress to live Docker) | ## Scripts in scripts/ | Script | Purpose | |--------|---------| | `migrate.py` | CLI launcher: runs phases 0-6, prints breadcrumbs for 7-11 | | `run_pipeline.sh` | Legacy shell wrapper (pre-migrate.py) | | `extract_wpress.py` | Unpack .wpress binary archive | | `analyze_db.py` | Parse SQL dump → pages.json + design-system.json | | `extract_divi5.py` | Parse Divi 5 blocks → per-page content JSON | | `extract_nav.py` | Extract WordPress nav menus → nav.json | | `stage_seed.py` | Map extracted JSON → seed_databases.py skeleton (Phase 6) | ## Key facts about .wpress archives - Format: Custom sequential binary (NOT zip/tar): 4377-byte headers - Table prefix in SQL dump: `SERVMASK_PREFIX_` (placeholder, NOT `wp_`) - Directory layout: flat: `uploads/`, `themes/`, `plugins/` at archive root (no `wp-content/` wrapper) - Divi 5 stores theme settings in `et_divi` option as PHP-serialized array ## Related SOPs - `../STACK.md`: AM deployment directory layout, build pipeline, WP migration playbook - `../OPTIMIZATION.md`: Full `` requirements, schema.org per page type - `../tools/verify-protection.sh`: Post-deploy security audit