Get online today — Domain + Hosting at discounted prices View Combo Offers ›

WordPress Serialized Search & Replace

Safely find and replace URLs in corrupted WordPress serialized arrays.

Use this tool to safely perform a "Search and Replace" operation on raw WordPress database rows containing PHP serialized data. If you recently migrated a WordPress website to a new domain name and find that your widgets, theme options, or page builder layouts are completely broken or missing, corrupted serialized data is almost certainly the culprit.

Unlike standard text, you cannot simply run a standard SQL REPLACE() query on WordPress options. This tool safely parses the complex PHP serialization syntax, updates your old URLs to the new URLs, and recalculates the strict string length integers to ensure the array does not become corrupted.

How it works

To save space in the MySQL database, WordPress takes complex PHP arrays (like a list of widget settings) and "serializes" them into a single, flat string of text. A serialized string looks like this: s:18:"http://old-site.com";.

The Corruption Problem: Notice the s:18? That tells PHP that the string is exactly 18 characters long. If you use a basic SQL query or a text editor to replace http://old-site.com (19 chars) with https://new-domain-name.com (27 chars), the string length integer (18) no longer matches the actual text length (27).

When WordPress attempts to read that row from the database, the PHP unserialize() function detects the mismatch, instantly aborts, and returns false. This is why your theme settings suddenly disappear after a migration.

The Solution: This tool performs the replacement safely. It utilizes regex to find valid serialized string blocks, swaps out the old URL with the new URL, mathematically recalculates the new string length, and perfectly reconstructs the serialized block so that WordPress can read it without errors.

Frequently asked questions

Is it safe to paste my database dump here?

This tool processes everything securely in RAM and immediately discards the data. However, for massive multi-gigabyte SQL files, you should NEVER use a web-based tool. You should use the official WP-CLI command (`wp search-replace`) directly on your server via SSH.

Why did my Elementor pages break after migrating?

Page builders like Elementor and Divi store their entire layout structures as massive serialized arrays in the `wp_postmeta` table. If you ran a standard SQL replace query during migration, you corrupted those arrays and destroyed the layouts.

Can this fix data that is already corrupted?

No. If the string lengths are already mismatched because you previously ran a bad SQL query, PHP cannot safely parse it. You must restore a backup of your database from *before* the bad query was run, and then use this tool on the original, uncorrupted data.

Does this handle serialized objects as well as arrays?

Yes, the string length recalculation logic targets the `s:XX:"...";` pattern, which applies identically to both serialized PHP arrays (`a:`) and serialized PHP objects (`O:`).

Related tools

Need hosting that just works?

Free SSL, daily backups and 24×7 support on every Loudhost plan.

View Hosting Plans