惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
The Blog of Author Tim Ferriss
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
云风的 BLOG
云风的 BLOG
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
P
Palo Alto Networks Blog
D
Docker
H
Hackread – Cybersecurity News, Data Breaches, AI and More
S
Schneier on Security
Engineering at Meta
Engineering at Meta
I
InfoQ
L
LangChain Blog
Cyberwarzone
Cyberwarzone
T
Tenable Blog
WordPress大学
WordPress大学
P
Privacy & Cybersecurity Law Blog
罗磊的独立博客
Apple Machine Learning Research
Apple Machine Learning Research
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Jina AI
Jina AI
C
CERT Recently Published Vulnerability Notes
Scott Helme
Scott Helme
博客园 - 三生石上(FineUI控件)
酷 壳 – CoolShell
酷 壳 – CoolShell
Know Your Adversary
Know Your Adversary
D
Darknet – Hacking Tools, Hacker News & Cyber Security
The Last Watchdog
The Last Watchdog
Last Week in AI
Last Week in AI
Cloudbric
Cloudbric
S
SegmentFault 最新的问题
爱范儿
爱范儿
Application and Cybersecurity Blog
Application and Cybersecurity Blog
博客园 - 叶小钗
AI
AI
T
Tor Project blog
I
Intezer
T
Threatpost
www.infosecurity-magazine.com
www.infosecurity-magazine.com
V
Visual Studio Blog
N
News and Events Feed by Topic
Latest news
Latest news
S
Security Affairs
博客园 - Franky
Microsoft Security Blog
Microsoft Security Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
B
Blog RSS Feed
C
Cybersecurity and Infrastructure Security Agency CISA
Hugging Face - Blog
Hugging Face - Blog
小众软件
小众软件
S
Securelist

记录生活,精彩一刻 - typecho

Typecho 插件推荐 UploadPlugin Typecho 站内搜索插件 SiteSearch(BUG) Typecho-Riven主题正式发售啦 Typecho 已经更新到1.3.0 ,你更新了吗? 分享一个适用于Typecho博客的Robots协议规则 推荐一款特别漂亮的Typecho主题 - 见字 Typecho插件:ImageAccelerator文章图片加速 Typecho开启Gzip压缩加速网站 Typecho 数据库字符集导致Emoji表情评论报错 Typecho 博客自定义右键 Typecho发布文章时出现的错误
Typecho 网站更换域名操作指南
Huo · 2024-05-29 · via 记录生活,精彩一刻 - typecho

Typecho logo

1、通用网站域名更换方法

  1. 域名解析,把新网站域名解析到网站 IP 上
  2. 修改 web 服务器配置文件,如 nginx.conf 、.htaccess、以及配置 SSL 证书等
  3. 修改站点配置和网站内容

2、Typecho 网站域名更换

Typecho 网站的域名更换方法和上面的基本一致,在第三点上可能有一些通过数据库操作的便捷方法。

对于网站配置和网站内容的修改,一种办法是进入到网站后台,挨个进行修改,只是这种方法太过于麻烦和耗时,另一种简易的办法是通过数据库直接进行修改,非常便捷,有遗漏的手动进行查漏补缺即可。

以下 SQL 语句默认表前缀为 typecho_,若你的数据库表前缀不是 typecho_,请自行修改语句。

2.1 修改 typecho\_options 表

将网站的设置里的域名替换成新的域名:

UPDATE `typecho_options` SET `value` = '新域名地址' WHERE `typecho_options`.`name` = 'siteUrl' AND `typecho_options`.`user` =0;

2.2 修改 typecho\_contents 表

将网站文章里的旧域名替换成新的域名:

UPDATE `typecho_contents` SET `text` = REPLACE(`text`,'旧域名地址','新域名地址');

2.3 修改 typecho\_users 表

将管理员的个人网站进行替换:

UPDATE `typecho_users` SET `url` = REPLACE(`url`,'旧域名地址','新域名地址');

2.4 修改 typecho\_comments 表

对评论中的管理员的域名,和评论中的旧域名进行替换:

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

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

如果使用的域名邮箱,也建议进行更换:

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

2.5 查漏补缺

如果还有其他的地方修改,参照上面的 SQL 语句进行替换即可,也可以进入网站后台手动进行修改~