Initial assessment without passwords Quote before intervention One accountable specialist from start to finish

Recovery & Prevention

WordPress Serialized Data Broken After Search and Replace

Plain SQL replacement can invalidate serialized string lengths and break widgets, builders or options. Restore and repeat with a WordPress-aware tool.

PHP serialized data stores the byte length of each string. A blind search-and-replace can change the text while leaving the stored length unchanged, making an entire option or metadata value unreadable.

Confirm that serialization is the failure

Look for unserialize() warnings, empty widgets, missing theme settings or page-builder layouts that vanished immediately after the replacement. Compare one damaged row with a pre-change backup rather than guessing the correct length.

Restore before you attempt another migration pass

If a clean backup exists, restoring the affected rows is safer than hand-editing serialized strings. Once the original value is back, repeat the replacement with a WordPress-aware tool and a dry run.

Keep the table and column scope explicit

  • target only tables that need migration;
  • exclude GUIDs unless there is a deliberate reason;
  • check JSON and escaped URLs separately;
  • include multisite tables only when the network is in scope.

Connect the repair to the migration symptom

If the replacement was intended to remove an old hostname, first review why WordPress can still use the old domain after migration. A database repair should solve a confirmed storage problem, not substitute for checking server redirects or cache.

Do not save broken settings repeatedly

Opening and saving a plugin or theme screen can overwrite a damaged but recoverable value with an empty default. Preserve evidence until you know which row is affected.

Verification after the repair

Complex settings and layouts should match the pre-migration state, logs should contain no serialization warnings, and a controlled dry run should show only expected remaining old-domain values. If URLs still fail at the routing layer, compare the post-migration permalink checks.

WP REPAIR INCIDENT STANDARD

How to narrow the fault without guessing

The resulting failures can look unrelated: missing theme settings, empty widgets, broken page-builder layouts or fatal unserialize warnings.

WP RepairDiagnostic model
1Symptom2Evidence3Controlled change4Verification
Follow the chain until you find the first point that stops behaving as expected.
01

Identify the replacement command, affected tables and available pre-change backup.

02

Look for unserialize warnings and empty configuration after the change.

03

Compare a damaged row with the backup rather than editing length values manually.

04

Check JSON, escaped URLs and multisite tables separately.

What must be verified

  • No unserialize warnings remain.
  • Complex settings and layouts match the pre-migration state.
  • A dry run shows no unintended old-domain values in active configuration.

ABOUT THIS SYMPTOM

Frequently asked questions about this guide.

Why does a simple find-and-replace on the domain name break unrelated settings like widgets or page-builder layouts?+

PHP serialized values store the exact byte length of each string alongside its content. Replacing a domain with a string of a different length without recalculating that stored length corrupts the entire serialized value, which can make widgets, theme settings, or builder layouts appear empty or throw unserialize warnings.

Can running the same search-replace twice make things worse?+

Yes. If URLs were already migrated correctly in a previous pass, running the operation again can modify already-correct data nested inside escaped strings, a failure mode distinct from the original single-pass corruption and one that needs its own check.

Is it safe to keep saving settings in wp-admin while serialized data is broken?+

No. Continuing to save settings in the admin can cause plugins to overwrite the damaged but still partially recoverable values with empty defaults, closing off the option to restore them from the original data.

Should the GUID column be included in a domain search-replace?+

Generally no, unless there's a deliberate reason to change it. GUID values are meant to remain stable identifiers, and excluding that column from the replacement operation is one of the standard precautions to avoid unintended side effects.

BEFORE YOU SEND THE REQUEST

Frequently asked questions.

Do you ask for passwords in the form?+

No. The public form never requests access. Secure credentials are requested only after the scope and quote are approved.

Who reviews the incident?+

The request goes to Jordi Ensenyat, founder of Code Barcelona and a WordPress specialist with more than 15 years of experience.

Is anything changed before the quote?+

No. Visible symptoms and scope are reviewed first. Intervention begins after approval and with a rollback path prepared.

Do you work internationally?+

Yes. WP Repair handles WordPress and WooCommerce incidents in English and Spanish through a remote service.

Assess my incident↗