Wordpress域名变更by sql:修订间差异

来自三线的随记
(创建页面,内容为“just for mark UPDATE wp_options SET option_value = replace(option_value, 'www.mydomain.com','www.newdomain.com') ; UPDATE wp_posts SET post_content = replace(post_…”)
 
无编辑摘要
第4行: 第4行:
  UPDATE wp_comments SET comment_content = replace(comment_content, 'www.mydomain.com', 'www.newdomain.com') ;
  UPDATE wp_comments SET comment_content = replace(comment_content, 'www.mydomain.com', 'www.newdomain.com') ;
  UPDATE wp_comments SET comment_author_url = replace(comment_author_url, 'www.mydomain.com', 'www.newdomain.com') ;
  UPDATE wp_comments SET comment_author_url = replace(comment_author_url, 'www.mydomain.com', 'www.newdomain.com') ;
[[分类:Wordpress]]
update wp_posts set post_content=replace(post_content,'olddomain.com','new_domain.com') where post_content like '%olddomain.com%';

2019年12月3日 (二) 21:47的版本

just for mark

UPDATE wp_options SET option_value = replace(option_value, 'www.mydomain.com','www.newdomain.com') ;
UPDATE wp_posts SET post_content = replace(post_content, 'www.mydomain.com','www.newdomain.com') ;
UPDATE wp_comments SET comment_content = replace(comment_content, 'www.mydomain.com', 'www.newdomain.com') ;
UPDATE wp_comments SET comment_author_url = replace(comment_author_url, 'www.mydomain.com', 'www.newdomain.com') ;
update wp_posts set post_content=replace(post_content,'olddomain.com','new_domain.com') where post_content like '%olddomain.com%';