移行された WordPress に取り組んでおり、サイトの URL が変更されました。プラグインによって保存されたシリアル化されたデータを除いて、すべて正常に動作します。
データはwp_options テーブルのoption_value 列に、プラグインが保存した各レコードに保存されます。したがって、データはまだ残っています。問題は、URL が変更されたときに再シリアル化されなかったことです (文字列コンテンツの数は、まだ古い URL の長さと見なされています)。そのため、プラグインが正しく機能していません。
したがって、更新が必要なレコードを正確に見つけるには、
$t1 = $wpdb->prefix . "vslider";
$t2 = $wpdb->prefix . "options";
$records_ineed = $wpdb->get_results("SELECT * FROM '".$t1."', '".$t2."' WHERE '".$t1."'.option_name='".$t2."'.option_name");
これにより、再シリアル化する必要があるレコードが正確に得られます (プラグイン テーブルで作成されたレコードの名前と、wp_option テーブルで作成されたレコードと一致します)。
私は今何をしますか?それぞれの option_value のみを取得し、シリアル化を解除し、再シリアル化して、データベース内の既存の値を更新するにはどうすればよいですか? 再シリアル化された値を新しいテーブルに保存し、そのテーブルから wp_options に戻す必要がありますか? どのように?そうでなければ、他の解決策は何ですか?