Site move between servers, serialize data
-
I routinely move WordPress installs between a test / local server and a public server. The pattern is typically to copy all files, and copy the database, making changes to the url for the home page and admin page in wp_options table.
Usually I also run search / replace on the domain to change it in the database where necessary.
I’ve come across an issue with a particular theme, though it’s likely a general issue. The them has its options in a field in the wp_options table, serialized. The act of making ANY changes to the database, either through a plain-text editor or even through phpMyAdmin causes the serialized data to become corrupt, seemingly through the addition of line-endings.
Having discovered this is occurring is already a massive weight off my shoulder; I could not for the life of me understand why the theme options were completely blank on the new copy of the site: the data was not being read from the table because it could not be unserialized correctly.
Has anyone else experienced this? Have any tips to transfer sites more effectively or a way to either edit non-destructively or revert any unrequested changes that occur when editing serialized field data?
Thanks!
The topic ‘Site move between servers, serialize data’ is closed to new replies.