typecho两个网站合二为一——转

  这些日子一直在折腾这个东西,本来是打算转到wordpress,然后通过wordpress自身的备份导入工具来完成的。但是,因为众所周知的原因——我懒,所以一直在寻找更加方便的方法。当然了,这个世界的发展是由懒人推进的,所以问题解决了。
我是怎么解决问题的呢?很简单,把两个网站的数据错开,比如说,第一个网站的文章id是从1~592,评论id是从1~2394,标签id是从1~1165。那么第二个网站的文章id就批量加上592,评论id批量加上2394,标签id批量加上1165。下面附上我使用的mysql语句,请酌情修改。

update blog_comments set coid=coid+'2394';
update blog_comments set cid=cid+'592';
update blog_contents set cid=cid+'592';
update blog_metas set mid=mid+'592';
update blog_metas set mid=mid+'1165';
update blog_relationships set mid=mid+'1165';
update blog_relationships set cid=cid+'592';

相关文章

发表新评论