干净的替换掉老域名需要如下三条sql查询语句: ``` UPDATE wp_options SET option_value = REPLACE(option_value,'old domain','new domain') WHERE option_name = 'home' OR option_name = 'siteurl'; UPDATE wp_posts SET post_content = REPLACE(post_content,'old domain','new domain'); UPDATE wp_posts SET guid = REPLACE(guid,'old domain','new domain'); ``` ``` domain格式 https://blog.361way.com最后不要带”/” <span id="more-1761"></span> 另外,直接拷贝以上三行执行sql语句时,别忘记确认下’单引号,可能拷贝下来的会出错……
Continue reading