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

推荐订阅源

美团技术团队
T
The Exploit Database - CXSecurity.com
aimingoo的专栏
aimingoo的专栏
小众软件
小众软件
T
Tailwind CSS Blog
V
V2EX
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
WordPress大学
WordPress大学
Hugging Face - Blog
Hugging Face - Blog
IT之家
IT之家
PCI Perspectives
PCI Perspectives
腾讯CDC
酷 壳 – CoolShell
酷 壳 – CoolShell
Recent Commits to openclaw:main
Recent Commits to openclaw:main
大猫的无限游戏
大猫的无限游戏
The Cloudflare Blog
N
News and Events Feed by Topic
博客园 - 三生石上(FineUI控件)
Help Net Security
Help Net Security
雷峰网
雷峰网
有赞技术团队
有赞技术团队
Last Week in AI
Last Week in AI
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
量子位
GbyAI
GbyAI
O
OpenAI News
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
AI
AI
S
Security Affairs
F
Fortinet All Blogs
L
LINUX DO - 最新话题
博客园 - 【当耐特】
Webroot Blog
Webroot Blog
Schneier on Security
Schneier on Security
W
WeLiveSecurity
Security Latest
Security Latest
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Tenable Blog
L
LINUX DO - 热门话题
Google DeepMind News
Google DeepMind News
Simon Willison's Weblog
Simon Willison's Weblog
Cyberwarzone
Cyberwarzone
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
C
CERT Recently Published Vulnerability Notes
Engineering at Meta
Engineering at Meta
P
Palo Alto Networks Blog
博客园 - 叶小钗
T
Threatpost
H
Heimdal Security Blog
Microsoft Security Blog
Microsoft Security Blog

I'M逆风

锐评现在手上的支持境外免费取现的银行卡(银联和万事达) 恐渐冻症 焦虑症 入门5G CPE体验 美碳C8-601 2024年终总结 好久没有更新了 世界,您好! 名侦探柯南2023剧场版电影 黑铁的鱼影 银行卡被冻结 大学生活好像和想象的不一样
Wordpress搭建的网站如何更换域名
逆风 120文章 118评论 · 2024-01-14 · via I'M逆风
点赞

https://blog.imnifeng.com/archives/704 复制链接 复制链接

我们可能会因为某些原因,需要更换网站的域名。而单纯的在后台更换域名,大概率不会完全更换。在前台的文章中引用的图片等资源可能还会是原来的域名地址。

可以执行如下的SQL语句在数据库中批量的替换旧域名

UPDATE wp_options SET option_value = replace(option_value, 'old.com','new.com') ;
UPDATE wp_posts SET post_content = replace(post_content, 'old.com','new.com') ;
UPDATE wp_comments SET comment_content = replace(comment_content, 'old.com', 'new.com') ;
UPDATE wp_comments SET comment_author_url = replace(comment_author_url, 'old.com', 'new.com') ;

注意在执行前一定要备份数据,避免因为误操作引起不必要的损失。

转载请保留原文链接

点赞

https://blog.imnifeng.com/archives/704 复制链接 复制链接

weinxin

我的微信

微信扫一扫

逆风

  • 本文由 逆风 发表于 2024年1月14日12:06:19
  • 转载请务必保留本文链接:https://blog.imnifeng.com/archives/704