WordPress:投稿内のURLを変更
WordPress 3.01
■事象
画像ファイルへのパスなどが絶対パスで入力されているため、これを変更。
ついでにレイアウトも壊れるので、GUIDも変更。
■対処
update wp_posts set post_content = REPLACE(post_content, 'old URL', 'new URL'); update wp_posts set guid = REPLACE(post_content, 'old URL', 'new URL');
■背景
CentOS5.5のSQLITEコマンドは、replaceに対応していない模様。
Firefoxのプラグインでコマンドを実行してみた。
SQLite Manger - Firefox Addon