Remove “%” from strings in serialized arrays in wp_postmeta
General idea would be to loop through all attachments to retrieve, modify and write back their meta. Something like this (test thoroughly before using on anything important): $posts = get_posts(array( ‘post_type’ => ‘attachment’, ‘numberposts’ => -1, )); foreach( $posts as $post ) { // retrieve data, unserialized automatically $meta = get_post_meta($post->ID,’_wp_attachment_metadata’, true); // do stuff … Read more