Back to DevLog

Wrestling with WordPress Caching While Shipping Theme Fixes

3 min read

Had one of those sessions where everything that could go wrong with caching did go wrong, but ended up shipping a ton of fixes for the honeybun workers and themes.

The Backfill Mystery

Started the day debugging why our MMB backfill was only returning 40% of fields (6 out of 15). Turns out the WordPress REST endpoint was using PhotoBooth-specific keys like booths, testimonials, faq, but our mapper expected DCC-schema keys like services, reviews, faqs. Added cross-vertical alias resolution and boom - backfill jumped to 80%.

Also fixed a priority issue where GET /client/:id/dcc was returning raw WordPress responses instead of our nice backfilled KV data. Simple fix: flipped it to kvDcc || wpDcc so the normalized data takes priority.

URL Structure Overhaul

Did a massive URL migration on MMB - moved 37 geo pages from flat slugs like photo-booth-rental-*-ks to a proper hierarchy under /service-areas/{county}/{city}/{venue}/. Then went further and restructured the whole site - booths under /booths/, events properly nested, venue types under /venues/. 81 total redirects created.

Updated all the URL helper functions to use the new /service-areas/ prefix and fixed a bunch of double home_url() wraps that were causing wonky links.

Theme Color Chaos

Ran into some gnarly gradient issues with the warm and light themes. The dark theme's gradient overrides were applying to ALL themes, causing white-on-white text that was completely unreadable. Scoped the gradient overrides to body[data-theme="dark"] only, so warm and light themes keep their native gradients.

Added opaque card backgrounds for warm (#fdf8f0) and light (#fff) themes to prevent gradient bleed-through. Also made sure the accent color variables override the hardcoded warm palette colors properly.

The Caching Nightmare

This is where things got fun. Updated the REST endpoint to read from bbs_* options instead of stale hb_pipeline_content, but the changes weren't showing up. Tried opcache_reset() via CLI - nothing. Tried it via web plus Breeze purge plus Varnish PURGE - still stale.

Turns out you need the full nuclear option: direct curl -X PURGE http://127.0.0.1:8080/path to Varnish, plus rm -rf wp-content/cache/breeze/*, plus opcache_reset() via a web PHP file. Aggressive caching is great until you actually need to update something!

The Little Wins

Got 10 draft pages published, fixed county cards that were rendering empty because of name mismatches ("Sedgwick" vs "Sedgwick County"), and added PHP fallback rendering for event cards so there's no blank space while JS loads.

Populated all 8 venue type pages with filtered links to actual named venues - so /venues/hotel-ballroom/ now links to the Hyatt, Broadview, etc. Nice bridge between search intent and location SEO.

What's Next

Still need to verify the event cards render properly after users purge their cache, and there are some testimonial cards showing white-on-white in the warm theme that need fixing. Also planning a dark-luxury preset for the realtor theme.

The venue pages are apparently looking like mobile-only on desktop, so that's on the list too. And I need to commit the changes that are currently only live on MMB back to the actual repos.

Overall productive session, even if the caching made it feel like I was debugging in molasses for a while. The MMB site is looking much better with proper URL structure and working themes across all color schemes.

Share this post