Typechoy一键更换域名

phpmyadmin修改数据库的方法对文章和评论的相关域名进行替换。
1、修改设置中的本站域名:位置typecho_options表

UPDATE typecho_options SET value = '新域名' WHERE typecho_options.name = 'siteUrl' AND typecho_options.user =0;
2、修改文章中相关域名:位置typecho_contents表

UPDATE typecho_contents SET text = REPLACE(text,'旧域名','新域名');
3、修改管理员个人网站:位置typecho_users表

UPDATE typecho_users SET url = REPLACE(url,'旧域名','新域名');
4、修改评论中相关域名:位置typecho_comments 表

UPDATE typecho_comments SET url = REPLACE(url`,'旧域名','新域名');
UPDATE typecho_comments SET text = REPLACE(text,'旧域名','新域名');
UPDATE typecho_comments SET mail = REPLACE(mail,'旧域名','新域名');`

评论区
头像