WordPress從phpmyadmin替換網址指令
原始網址以http://www.old.tk表示,新網址以http://www.new.tk表示,
注意結尾都不用加上"/"。
UPDATE wp_posts SET guid=REPLACE(guid,'http://www.old.tk','http://www.new.tk');
UPDATE wp_options SET guid=REPLACE(guid,'http://www.old.tk','http://www.new.tk');
UPDATE wp_postmeta SET guid=REPLACE(guid,'http://www.old.tk','http://www.new.tk');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.old.tk','http://www.new.tk');
參考2
UPDATE wp_options SET option_value = replace(option_value, 'http://www.old.tk', 'http://www.new.tk') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://www.old.tk','http://www.new.tk');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old.tk', 'http://www.new.tk');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.old.tk','http://www.new.tk');
參考資料 https://codex.wordpress.org/Changing_The_Site_URL
https://www.developerdrive.com 修改資料表前綴
注意結尾都不用加上"/"。
UPDATE wp_posts SET guid=REPLACE(guid,'http://www.old.tk','http://www.new.tk');
UPDATE wp_options SET guid=REPLACE(guid,'http://www.old.tk','http://www.new.tk');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.old.tk','http://www.new.tk');
參考2
UPDATE wp_options SET option_value = replace(option_value, 'http://www.old.tk', 'http://www.new.tk') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://www.old.tk','http://www.new.tk');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old.tk', 'http://www.new.tk');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.old.tk','http://www.new.tk');
參考資料 https://codex.wordpress.org/Changing_The_Site_URL
https://www.developerdrive.com 修改資料表前綴
留言
張貼留言