WordPress新浪图床失效后批量替换

18 5月

WordPress新浪图床失效后批量替换

原理是http没法传referer到https

前提是你的服务器这边是https

然后图片全部换成http

先进入wp的数据库

UPDATE wp_posts  SET post_content = REPLACE (post_content, 'src="//ws1.sinaimg.cn', 'src="http://ws3.sinaimg.cn');
UPDATE wp_posts  SET post_content = REPLACE (post_content, 'src="//wx1.sinaimg.cn', 'src="http://ws3.sinaimg.cn');
UPDATE wp_posts  SET post_content = REPLACE (post_content, 'src="//ww1.sinaimg.cn', 'src="http://ws3.sinaimg.cn');
UPDATE wp_posts  SET post_content = REPLACE (post_content, 'src="//ws2.sinaimg.cn', 'src="http://ws3.sinaimg.cn');
UPDATE wp_posts  SET post_content = REPLACE (post_content, 'src="//wx2.sinaimg.cn', 'src="http://ws3.sinaimg.cn');
UPDATE wp_posts  SET post_content = REPLACE (post_content, 'src="//ww2.sinaimg.cn', 'src="http://ws3.sinaimg.cn');
UPDATE wp_posts  SET post_content = REPLACE (post_content, 'src="//ws3.sinaimg.cn', 'src="http://ws3.sinaimg.cn');
UPDATE wp_posts  SET post_content = REPLACE (post_content, 'src="//wx3.sinaimg.cn', 'src="http://ws3.sinaimg.cn');
UPDATE wp_posts  SET post_content = REPLACE (post_content, 'src="//ww3.sinaimg.cn', 'src="http://ws3.sinaimg.cn');
UPDATE wp_posts  SET post_content = REPLACE (post_content, 'src="//ws4.sinaimg.cn', 'src="http://ws3.sinaimg.cn');
UPDATE wp_posts  SET post_content = REPLACE (post_content, 'src="//wx4.sinaimg.cn', 'src="http://ws3.sinaimg.cn');
UPDATE wp_posts  SET post_content = REPLACE (post_content, 'src="//ww4.sinaimg.cn', 'src="http://ws3.sinaimg.cn');

发表评论

电子邮件地址不会被公开。 必填项已用*标注