The Problem
Some post links were pointing to the site’s former domain—despite everything appearing up to date. These weren’t hardcoded URLs, but rather relationship fields powered by ACF, embedded throughout templates and custom layouts.
What We Found
🔗 ACF Relationship Data
The broken links came from ACF’s relationship fields, which were still referencing the old domain within serialized postmeta data.
📦 Serialized Structure
Since WordPress stores complex field data in a serialized format, standard search-and-replace techniques won’t work—doing so can break the structure and corrupt values.
How We Fixed It
1. Backed Up the Database
Always the first step—ensuring a recovery point before making mass changes.
2. Used a Safe Replace Tool
We installed the Better Search Replace plugin and enabled the option for serialized data handling.
3. Ran a Dry Test
Before committing changes, a test run confirmed how many entries would be affected.
4. Replaced the Old Domain
With confidence, we replaced the outdated domain in the necessary database tables (especially wp_postmeta).
5. Cleared All Caches
After replacement, we cleared all site and browser caches to reflect the changes immediately.
The Result
No more unexpected redirects. Relationship links now point to the correct domain, and ACF fields behave as expected across the site.
Having redirect headaches after a domain change?
Reach out to Integriti Studio — we’ll help clean up legacy data the right way.
Need help improving your WordPress forms or custom workflows? We build clean, reliable, and growth-driven WordPress solutions—without breaking a sweat.
Let’s Talk