Home / Ongoing Work / Hosting & Infrastructure / Hardcoded URL cleanup after domain change

After a domain change, hardcoded references to the old domain — in theme files, custom code, or content that wasn’t caught by a standard database URL update — can leave broken links, missing images, or mixed-content warnings scattered across the site, since these aren’t stored in the database fields a normal migration tool checks.

CFG-003

Hardcoded URL cleanup after domain change

Leftover hardcoded references to your old domain, found in code and content a migration tool missed.

$109.32 delivered in 48 hours
Needs Database access and WP admin login. Create a limited sub-account — we never ask for your own password.
  • Full backup taken before we start
  • If we can’t fix it, you get your money back
  • We never ask for your own password

What we need from you

  • Confirmation of the old and new domain
  • Access to theme, plugin, and custom code files, not just the database
  • Confirmation of any specific pages or features you’ve already noticed showing old-domain references

This or something else?

You’ve already changed domains and specific hardcoded references to the old one remain This fix covers it
You’re doing the full domain change itself, not just cleaning up leftover references afterward Domain change – full site URL migration, the broader, complete process
The leftover references are specifically staging URLs, not a domain change Staging URL removal – serialization-safe replace
You want a broader search for hardcoded URLs across theme and plugin code specifically Still covered by this fix — that’s exactly the scope this addresses

What we do

  1. Search theme files, custom code, and content for hardcoded references to the old domain
  2. Correct each instance found to reference the new domain
  3. Verify no broken links, missing images, or mixed-content warnings remain
  4. Check common overlooked locations (widget text, custom CSS, JavaScript files)
  5. Test the site thoroughly across page types after correction
  6. Provide a written summary of what was found and corrected

What is included

  • Hardcoded old-domain references found and corrected across code and content
  • Verified resolution of resulting broken links or mixed-content warnings
  • A check of commonly overlooked locations beyond the database
  • A written summary of what was corrected

Not included

  • The core domain migration itself, if not already done — a separate, broader fix
  • Database-level URL updates, which a standard migration tool typically already handles
  • Ongoing cleanup as new hardcoded references are introduced by future code changes
  • Fixing an unrelated site issue discovered during this review

Questions about this fix

Why would hardcoded references survive a domain migration I already did?

Standard migration tools typically update the database, but code hardcoded directly into theme files, custom scripts, or certain plugin settings isn't always caught by that process, since it's not stored where a database search-and-replace would look.

How do I know if I actually have this problem?

Broken images, mixed-content warnings, or links pointing at your old domain are the visible signs — though some hardcoded references (in JavaScript or CSS files, for instance) might not be immediately obvious without a direct code search.

Will this also catch references in plugin settings, not just theme files?

We check plugin settings that commonly store URLs directly, though a plugin with deeply custom or unusual storage could still need its own separate consideration if something's found there.

Is this the same as the full domain migration service?

No — this is specifically for cleaning up leftover references after a migration has already happened; the full migration service covers the entire process of moving a site to a new domain in the first place.

Could I still have some hardcoded references even after this fix?

We search thoroughly across the common locations these tend to hide, though genuinely unusual or deeply custom code could theoretically still have something we didn't anticipate — we'd address anything found afterward as a quick follow-up.

Hardcoded URL cleanup after domain change
$109.32 · delivered in 48 hours · needs Database access, WP admin login

Related fixes

If this is the second time this year

A bad update breaking the site is a symptom of updates not being tested first. Care plans run every update on a staging clone before it reaches your live site, which is the actual fix for this happening again.

See care plans

Your access, your rules

Create a separate admin account for us and delete it when we are done. For anything else, we get in touch and agree a method — never a form field on this site, never by reply to an email.

We back up first, always

Before anything is touched we take a full backup and keep it for 30 days. If a fix goes wrong, we put the site back exactly as it was.

If it is not what you bought

If the problem turns out smaller than what you ordered, we refund the difference. If it is bigger, we stop and send a quote before doing any extra work.

If we cannot fix it

You get back what we received. Diagnosis is on us — you only pay when the problem is actually solved. The payment processor takes its fee before the money reaches us, so we never hold it and it is not ours to return. That is true here as everywhere else.

If it comes back

Reply within seven days of delivery and we put it back on the bench at no cost. The fix is not finished until it holds.

What we are responsible for

If something goes wrong with a fix, our responsibility is limited to what you paid for it. We take a full backup first so mistakes can be undone, and we tell you before doing anything outside what you bought.