To search and replace URLs after moving WordPress, let the site address rewrite handle the main URLs, search the database for what remains, then add find and replace rules for those strings, with serialized data handled by the tool rather than by SQL. A plain UPDATE or REPLACE() on the database is the usual cause of broken widgets and blank page builder layouts after a move.
Why serialized data breaks
WordPress stores many values as serialized PHP. A string inside that format carries its own byte length:
s:24:"https://dev.example.test";
The number 24 is the length of the string in bytes. If you replace the URL with a shorter one and leave the number alone, the value no longer unserializes. PHP returns false, and the widget, menu, theme option or builder setting disappears without a clear error. Changing dev.example.test to example.com gives this:
s:19:"https://example.com";
The length has to be recalculated for each value. That is why a search and replace that is safe for plain text can damage serialized data.
Page builders add a second problem. Many of them store JSON inside the database with escaped slashes, so the old address appears as https:\/\/dev.example.test. A search for the plain address will miss it.
Steps
- Run the migration or pull first. Shiftora’s automatic site address rewrite updates the main site links, so the search only has to cover what the rewrite missed.
- Take a database dump of the destination before any replacement. Keep it until the site has been checked.
- Search the destination database for the old domain. Use the database tool that your local environment or host provides, or search a dump file, and count the hits per table.
- Note where the hits are. Options (
siteurl,home), posts (post_content,guid), post meta (builder data, often JSON), theme mods and widget options each need a different look. - Check for variants:
http://andhttps://, protocol-relative//dev.example.test, escaped slashes in JSON, and the domain with and withoutwww. - Add a find and replace row for each string. Use the From and To rows in Shiftora. The rules run after the automatic rewrite and handle serialized data safely, so you do not need to edit the rows by hand.
- Order the rows so that the longest strings run first. A short domain can partly match a longer path, such as
https://dev.example.test/wp-content, and that path should be replaced first.

- Run the replacement, then search again. Expect zero hits in post content, options and menus. Hits in comments, logs or old revisions matter less, but check them.
- Load the front page, a page built with a page builder, a page with widgets, the menus and the images. Look for missing settings, which usually means a value failed to unserialize.
- If a value is missing, restore the dump from step 2 and fix the rule that caused it before you run the replacement again.
Test the replacement on a copy
Run the replacement on a copy of the destination before you run it on the real one. The custom find and replace rules are part of the free plugin at https://wordpress.org/plugins/shiftora/, so the same rules can run on a copy you control. Count the hits before and after, then compare the front page, a page with a builder layout and a widget area. If a value disappears on the copy, the rule is wrong, and you found that out without touching live data.
A count tells you the rule ran. A page check tells you the rule did not break anything. You need both, and the page check matters more, because a value that fails to unserialize can leave no error on the page at all. Keep a short record of each rule: the string it replaces, the number of hits it cleared and the date. When someone asks why a URL changed, the record answers the question.
Avoid broad patterns. A bare domain name can match inside strings you did not mean to change, so use the full string, including the scheme, wherever you can. The Shiftora documentation at https://shiftora.devsync-agency.com/documentation/ covers the find and replace screen.
When a value is still wrong
Some values hold a URL inside a longer string, such as a path inside a JSON blob, or a value that was split across two rows. A rule for the full domain can miss these. Search for the path on its own, find the row, and decide whether the value should be replaced at all. A cached copy of a stylesheet or a script often needs a cache clear rather than another database change.
FAQ
Why not run an SQL replace on the database directly?
A plain SQL replace changes the string length without updating the s: count in front of it. The serialized value then fails to unserialize, and the damage often goes unnoticed until someone opens a widget or a menu.
Does Shiftora handle serialized data?
Its custom find and replace rules run after the automatic address rewrite and are documented to handle serialized data safely. Check the result on a copy first, as you would with any replacement.
Why do images still point to the old domain after the replacement?
The address is often in a place the database search does not reach, such as a CDN setting, a theme file or a cached stylesheet. Theme files are not copied by the free plugin, so check the copied theme as well as the database.
Next step: take a database dump before your first replacement run, and do not delete it until the site has passed your checks.