In changing http to https in several option_values I lost page content. So I reverted the site url back to http and tried to replace an option_value in the wp_options table with data from a recent backup using phpmyadmin, and checked the data saved correctly. However when the website is loaded the data is replaced with
a:1:{s:12:"_multiwidget";i:1;}
The data includes serialized data. I realise that the string lenght values need to be correct, but the backup data was from when it was working so that should be correct. Is there other related data that needs updating?
Here's the content including backslashes for sql import and split into new lines for easy reading:
a:13:{
i:1;a:0:{}
i:2;a:4:{s:5:"title";s:8:"About Us";s:4:"text";s:0:"";s:6:"filter";b:1;s:6:"visual";b:1;}
i:3;a:4:{s:5:"title";s:0:"";s:4:"text";
s:216:"<a href="http://someurl"><img class="wp-image-367 alignleft" src="http://someimageurl" alt="" width="117" height="84" /></a>";
s:6:"filter";b:1;s:6:"visual";b:1;}
i:5;a:4:{s:5:"title";s:0:"";s:4:"text";s:0:"";s:6:"filter";b:1;s:6:"visual";b:1;}
i:6;a:4:{s:5:"title";s:8:"Approach";s:4:"text";s:425:"some long text.
[embed]https://www.youtube.com/watch?v=someid[/embed]";s:6:"filter";b:1;s:6:"visual";b:1;}
i:7;a:4:{s:5:"title";s:8:"Our Team";s:4:"text";s:3016:"<a href="https://www.linkedin.com/in/someid/"><img class="wp-image-4308 size-full alignleft" src="http://someimageurl" alt="" width="270" height="287" /></a>
sometext
<strong>sometext</strong>
somelongtext.";s:6:"filter";b:1;s:6:"visual";b:1;}
i:8;a:4:{s:5:"title";s:10:"Contact Us";s:4:"text";s:23:"someemail";s:6:"filter";b:1;s:6:"visual";b:1;}
i:9;a:4:{s:5:"title";s:0:"";s:4:"text";s:23:"someemail";s:6:"filter";b:1;s:6:"visual";b:1;}
s:12:"_multiwidget";i:1;
i:11;a:4:{s:5:"title";s:4:"test";s:4:"text";s:7:"testing";s:6:"filter";b:1;s:6:"visual";b:1;}
i:13;a:4:{s:5:"title";s:0:"";s:4:"text";s:53:"https://www.youtube.com/watch?v=someid
";s:6:"filter";b:1;s:6:"visual";b:1;}
i:15;a:4:{s:5:"title";s:0:"";s:4:"text";s:68:"[embed]https://www.youtube.com/watch?v=someid&t=51s[/embed]";s:6:"filter";b:1;s:6:"visual";b:1;}
i:16;a:4:{s:5:"title";s:0:"";s:4:"text";s:64:"[embed]https://www.youtube.com/watch?v=someid&t=51s[/embed]";s:6:"filter";b:1;s:6:"visual";b:1;}}
question from:
https://stackoverflow.com/questions/65831458/how-to-fix-wordpress-option-value-with-serialized-data 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…