WordPress:DB 內網站網址批次修改
UPDATE wp_posts
SET post_content = REPLACE(post_content, 'www.abc.com', 'www.xyz.com')
WHERE post_content LIKE '%www.abc.com%';
UPDATE wp_posts
SET guid= REPLACE(guid, 'www.abc.com', 'www.xyz.com')
WHERE guid LIKE '%www.abc.com%';
UPDATE wp_options
SET option_value = REPLACE(option_value, 'www.abc.com', 'www.xyz.com')
WHERE option_value LIKE '%www.abc.com%';
UPDATE wp_postmeta
SET meta_value = replace(meta_value,'www.abc.com', 'www.xyz.com')
WHERE meta_value LIKE '%www.abc.com%';
阅读剩余
THE END