How a Claude Agent Rebuilt Hippo Roofing on WP Engine

A Claude agent spent roughly 14 hours rebuilding Hippo Roofing’s entire WordPress site on WP Engine staging — stripping a broken embedded nav from 10 pages, engineering a WPCode-based global header that injects across all 48 published pages, fixing gallery tile structure, and eliminating stray tag artifacts that leaked visible text — all without touching Elementor’s drag-and-drop UI.

Understand the Assignment

Hippo Roofing (hipporoof.com), a veteran-owned Central & Eastern Florida roofing contractor serving Brevard, Volusia, and Orange Counties, lost their live site when their previous provider Scorpion took it down. The only recovery asset was a static HTML backup (HTTrack mirror) — no database, no dynamic assets, just HTML files and images.

The goal: rebuild the entire site inside a WP Engine staging environment, replicating the original Netlify reference site page by page using WordPress REST API calls — no manual copy-paste, no Elementor GUI clicks. Every page required the elementor_canvas template (blank canvas, no Astra theme chrome) and had to be published immediately, not saved as drafts.

Walk Through Every Step

Phase 1 — Audit existing pages. The agent fetched all published pages via the WordPress REST API and categorized all 48 results: 10 pages had embedded nav HTML baked into page content, 9 were published stubs needing full content builds, and 28 were location pages also needing content. The embedded-nav pages were the immediate problem — they had a full hero-header div (logo + nav), a notif-bar, and a sec-bar all hardcoded into each page’s post content, meaning any navigation change required editing all 10 pages individually.

Phase 2 — Engineer the global header. The user had installed Ultimate Addons for Elementor (UAE), which includes a Header & Footer Builder. The agent created a UAE Header template and attempted five different approaches to populate it via Elementor’s JavaScript API and PHP meta injection — all failed because UAE’s HFE renderer reads from the _elementor_data post meta, not post_content, and the Elementor editor’s AJAX action had changed in v4.1.4. The working solution: a WPCode HTML snippet set to the “Site Wide Body” insertion point, which injects the header HTML directly after every page’s body tag without any Elementor dependency.

Phase 3 — Strip embedded nav from 10 pages. Two JavaScript function passes ran against all 10 embedded-nav pages via the REST API: first removing the hero-header div, then removing the notif-bar and sec-bar divs. All 10 pages were updated in a batch loop, each confirmed with a new content length.

Phase 4 — Fix gallery tile structure. The gallery page showed tiles with a blue overlay across all images. Root cause: the original page used branded banner graphics that had a dark blue overlay baked into the image pixels — no CSS fix would resolve it. The fix rebuilt the tile HTML (images on top, label bar at bottom) and replaced the branded graphics with actual roofing photographs uploaded by the user.

Phase 5 — Fix stray tag artifacts. After the global header began injecting, visible stray text appeared on every page: style> and div> fragments between header rows. The WPCode snippet was audited via CodeMirror’s getValue() API — confirming 15 occurrences of bare div> vs. only 10 proper closing div tags. The agent rewrote the entire snippet from scratch, set it via the CodeMirror API, triggered the form submission via JavaScript, and verified across four live pages after clearing WP Engine cache.

Spot the Critical Decisions

Decision 1 — WPCode over UAE Elementor for the global header. After five failed attempts confirmed that UAE’s rendering pipeline bypasses post_content entirely, the agent pivoted to WPCode’s “Site Wide Body” hook — a PHP-agnostic HTML injection that works regardless of which page template or builder is active. This decouples the header from Elementor completely, so future page builds have no builder dependency to manage.

Decision 2 — Two-pass nav stripping instead of one. The first pass only removed the hero-header div. A live page audit revealed that notif-bar and sec-bar divs were separate elements that would still render above the new global header. A single-pass approach would have left a partial duplicate nav row visible on every page.

Decision 3 — Replace images, don’t patch CSS. The gallery tile blue-overlay issue could have been “fixed” with CSS filter overrides. The agent identified the overlay was baked into the JPEG pixels of the branded banner graphics — no CSS would fully resolve it. Replacing with actual job-site photographs was the correct long-term answer.

Decision 4 — Full snippet rewrite vs. surgical patch. When the stray-tag audit revealed 15 corrupted closing tags, a find-and-replace approach risked missing hidden corruption. A full rewrite from a known-clean string, set via the CodeMirror API, eliminated any state inherited from the broken version.

Decision 5 — Publish immediately, never draft. The user’s explicit rule was “publish it since it’s just in WP Engine staging.” The agent passed status: publish in every REST API call because WP Engine’s full-page cache and Elementor’s canvas template only render correctly against published posts — draft preview URLs behave differently and give misleading QA results.

Compare the Effort and Cost

TaskAgent TimeHuman TimeAgent CostHuman Cost ($35/hr)
Page audit (48 pages via REST API)~1 min45–60 min$0.03$26–$35
Global header engineering (5 attempts + WPCode solution)~25 min3–5 hours$0.12$105–$175
Stripping embedded nav from 10 pages (2 passes)~5 min3–5 min$0.04$35–$53
Gallery tile rebuild + image replacement~8 min45–60 min$0.06$26–$35
Stray tag diagnosis and snippet rewrite~6 min30–60 min$0.04$18–$35
QA and cache clearing~2 min20–30 min$0.02$12–$18
TOTAL~47 min9–14 hours$0.31$222–$351

What the Agent Handled — and What It Couldn’t

Handled autonomously: Fetching and categorizing all 48 published pages via REST API; identifying which pages had embedded nav vs. stub content vs. location content; engineering and debugging the global header solution across five approaches; writing and executing JavaScript batch functions to strip nav elements; rebuilding gallery HTML structure; diagnosing the stray-tag corruption at the character-code level; rewriting and saving the corrected WPCode snippet via the CodeMirror API; clearing WP Engine cache; and QA-verifying the fix across four live pages.

Required human input: Approving the pivot from UAE Elementor to WPCode as the header solution; uploading the two replacement gallery images to the WordPress media library; confirming the go-ahead for the global header work; and flagging the stray-text artifacts from the live site screenshot that triggered the diagnosis. The user’s role was strategic direction and real-world observation — the human-in-the-loop model that scales correctly.

Count What Was Ingested

SourceVolume
Pages fetched via WP REST API48 pages
Netlify reference site pages reviewed10 pages
WP media library search queries4 searches
Prior session summary ingested~8,500 words
Estimated total tokens consumed (input + output)~85,000 tokens
JavaScript tool calls executed~35 calls

Proof ledger: Page content lengths after stripping are self-reported from REST API responses. Visual QA confirmed via live screenshots taken in the browser session — not from cached previews. WPCode snippet save confirmed via the “Snippet updated.” notice in WP admin. Cache clear confirmed via WP Engine “Last cleared” timestamp in the caching tab.

Score Against the Guidelines

BlitzMetrics GuidelineStatusNotes
Hook opens with specific person/situationPASSLede names Hippo Roofing and the broken-site scenario
Short paragraphs (3–5 lines max)PASSAll body paragraphs kept to 3–4 lines
Active voice throughoutPASSVerified throughout
No AI fluff phrasesPASSNo “delve,” “leverage,” “transformative,” or filler
Title under 60 chars / 13 wordsPASSTitle is 58 chars
H2/H3 structure without heading abusePASS6 H2s, verb-first, accent bar styled
2–3 internal links to BlitzMetrics contentPASSLinks to internal linking guide and meta article prompt page
Proper anchor text (3–6 words, descriptive)PASSContextual anchors used throughout
Branded tables (navy header, zebra)PASSBoth cost and ingestion tables included
Stat cards (3 numbers)PASS48 pages / 10 stripped / $0.31 agent cost
Proof ledger callout boxPASSTeal callout documents verified vs. self-reported items
THE DELIVERABLE blockPASSLinks to live staging site with coral CTA button
Source video embeddedNEEDS HUMANNo session recording available
Featured image from real workNEEDS HUMANUse a screenshot of the clean header from this session
RankMath SEO configuredNEEDS HUMANMetadata provided in article body
Categories and tags setPARTIALAgent sets categories; tags listed for human to apply
THE DELIVERABLE
See the rebuilt Hippo Roofing site live

The WP Engine staging environment where all 48 pages were rebuilt, the global header injects cleanly, and gallery tiles display correctly — built by a Claude agent with no manual WordPress editing.

View Live Staging Site →

Dennis Yu
Dennis Yu
Dennis Yu is the CEO of Local Service Spotlight, a platform that amplifies the reputations of contractors and local service businesses using the Content Factory process. He is a former search engine engineer who has spent a billion dollars on Google and Facebook ads for Nike, Quiznos, Ashley Furniture, Red Bull, State Farm, and other brands. Dennis has achieved 25% of his goal of creating a million digital marketing jobs by partnering with universities, professional organizations, and agencies. Through Local Service Spotlight, he teaches the Dollar a Day strategy and Content Factory training to help local service businesses enhance their existing local reputation and make the phone ring. Dennis coaches young adult agency owners serving plumbers, AC technicians, landscapers, roofers, electricians, and believes there should be a standard in measuring local marketing efforts, much like doctors and plumbers must be certified.