Cli And Deploy¶
WP-CLI Batch Scripts for Multi-Site Operations¶
Moved to sops/wp-cli-batch-scripts.md on 2026-05-20 — see SOP for the full procedure.
DearFlip (dflip) Flipbook CPT thumbnails are client-side — WP-CLI bulk creation skips the auto-thumb step¶
From legacy section: SEO NEO / Workbook
Pattern: DearFlip's "auto thumbnail from PDF page 1" only fires when the Flipbook post is saved through the admin UI: the JS reads page 1 with pdf.js in the browser and submits a base64 JPEG via the metabox form. The server-side
process_thumb()ininc/metaboxes.phponly writes a file when the inboundpdf_thumbis adata:image/jpeg;base64,...payload. Bulk-creating Flipbook posts via WP-CLI (wp post create --post_type=dflip+update_post_meta('_dflip_data', ...)) doesn't go through any browser, so no thumbnail gets generated — every shelf thumb on the resulting page renders as a missing image. Rule: Any pipeline that mass-creates DearFlip Flipbook posts must extract page-1 covers itself and place them at/wp-content/uploads/dflip-thumbs/{POST_ID}.jpegAND set_dflip_data['pdf_thumb']to the URLhttps://{site}/wp-content/uploads/dflip-thumbs/{POST_ID}.jpeg?{timestamp}(the?{timestamp}cache-buster matters — DearFlip uses it). Cover extraction one-liner:gs -sDEVICE=jpeg -dJPEGQ=90 -r150 -dFirstPage=1 -dLastPage=1 -sOutputFile=cover.jpg input.pdf. Useset_url_scheme(content_url(...), 'https')notcontent_url()— the latter sometimes returnshttp://on multisite/HTTPS-mixed installs. Reference implementation:clients/_active/empire-media-network/build/bulk-flipbooks.php. Date: 2026-04-28
For 5+ WordPress pages of the same change, use WP-CLI eval-file over SSH — not MCP calls¶
Moved to sops/wp-cli-batch-scripts.md on 2026-05-20 — see SOP for the full decision tree and commands.