Support Forum

Dealing with serialized data when migrating your WordPress site

BS Brad Siegfried
Brad Siegfried
Member

I recently migrated my WordPress site to a new server with a new URL.  Trying to do a simple text search and replace on a database export to change from myoldsite.org to thenewsite.org will cause problems with serialized data.  Because serialized data has an explicit length specified, both the data and the length must be changed.

This site offers some good explanation of serialized data in WordPress:

http://wpgarage.com/tips/data-portability-and-data-serialization-in-wordpress/

This site has a great utility that I used successfully to search and replace serialized data:

http://interconnectit.com/124/search-and-replace-for-wordpress-databases/

1 Answer

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

That’s useful and a great tip. Thanks for posting.

There should not be many instances of the url in serialised arrays but I know there are some. I keep all of my test websites to the same name length for this very reason.