I've setup 2 extra machines for a client I'm setting up wpmu for. We have had a production server that I'll call domain.com for a while and has all the current data on it. We've now also setup domaindev.com and domainqa.com. I'd like to get the data from the production server onto the dev and qa machines. I dumped the database from production, did a search/replace on the domain names and then imported the changed database onto the dev machine, everything seems to work except for some of the blog options.
Specifically, any option in the wp_1_options table (also for any other blog id) that originally contained domain.com has now changed to domaindev.com, but the length defined in the option value has not updated and so the get_option function does not return the value as an array.
As an example, below is the value of a widget_text option on my site in the production domain that would work:
a:3:{i:1;a:2:{s:5:"title";s:0:"";s:4:"text";s:0:"";}
s:6:"number";i:2;i:2;a:2:{s:21:"Check out other blogs";s:4:"text";
s:65:"<ul><li><a href="http://test.domain.com/">Test Blog</a></li></ul>";}}
After changing the domain to domaindev.com, the length of the last item (defined as 's' before the html the user entered as the widget text) would remain unchanged at 65, causing get_option to return the entire option as a string instead of an array, because the length should actually be 68, i.e.:
a:3:{i:1;a:2:{s:5:"title";s:0:"";s:4:"text";s:0:"";}
s:6:"number";i:2;i:2;a:2:{s:21:"Check out other blogs";s:4:"text";
s:65:"<ul><li><a href="http://test.domaindev.com/">Test Blog</a></li></ul>";}}
Can anyone think of a good way to go through the options for each blog and update the string lengths for options where the domain name has changed?
If any of this does not make sense, please let me know and I will try to clarify.