流水

巨大勇气-再见zblog,迎接WordPress

水文章

再在zblog里面水最后一篇文章,话说今年第一篇文章就水是有点过分,但是工程量实在是很大。省点时间吧,少说两句。

zblog网站的内容

爱好折腾

世上有难事,但是经不起折腾。

难事来了,我用过zblog的asp版本,zblogasp转zblogphp比较简单,有插件,数据结构也比较接近,但是zblogphp转WordPressphp的时候就难了。

难事是经不起折腾的,敢折腾,对于难来说就不怎么存在了,事也解决了。在转之前要达到一个目的,有一个完整的思路

  1. 域名和原来的一样,也就是说要有一个测试域名临时用着,等替换完成再更改。比如zblog我现在用的域名是www.shijianairen.com和shijianairen.com,shijianairen.com重定向到www.shijianairen.com,我现在把shijianairen.com这个域名解绑,新建一个shijianairen.com为域名的站点,开始搭建WordPress的网站。等以shijianairen.com的这个WordPress网站做好了,再把www.shijianairen.com这个域名解绑,绑定到shijianairen.com的站点上,然后shijianairen.com再重定向到www.shijianairen.com,因为我主域名就是设计的要用www为主机头。
  2. url和原来的一样,也就是说原来配置的伪静态规则要用到新的上面,为的是已收录的文章和分享出去的文章,要保证搜得到就要打的开。当然有四五百篇文章都是搜不到的,如果没有验证到管理员登陆的cookie,那些隐藏的内容是不能显示的。要达到已收录的文章和分享出去的文章都可以打开,那就要在新的WordPress网站上设计和设置伪静态以及重定向的配置
  • 在现在的zblog里面我的主页就是www.shijianairen.com
  • 在现在的zblog里面我的分类页是www.shijianairen.com/category-guanyuwenxue.html,但是分类只有十个,而且部分分类里面都是隐藏的文章,所以即便是删除几个分类,分类重建也是可以完成的。我打算建成www.shijianairen.com/guanyuwenxue。WordPress默认的分类路径是www.shijianairen.com/category/guanyuwenxue,应该要用到一个插件是nocategory或者就改代码。
  • 在现在的zblog里面我的标签是www.shijianairen.com/tags-literature.html,分类比较多有四五十个吧,这个就尽量和原来一样比较好,因为涉及的内链接比较多。
  • zblog评论的那个链接是不收录的,所以不用管,谁也不会闲的没事分享别人的评论那个链接,他也不好找。所以不管。
  1. 系统里是文章,标签,分类,独立页面,日期页,评论(包括留言)
  2. 服务器上目录结构主要是图片存放的路径,因为文章里面用到的就是url上的绝对路径。这个可以直接把zb_users/upload搬到shijianairen.com的根目录,保证原来文章的图片还在。但是既然决定了要折腾一番,那就改个彻底,查了一下数据表才发现,对了,不能直接那样改,这一步是省不了的。导出sql之后用notepad++或者sublimetext等等代码编辑器吧,查找替换(一般为ctrl+h),查找的是https://luhangwang.oss-cn-hongkong.aliyuncs.com/lhoss/old/  替换为   wp-content/uploads 。因为zblog在开发的过程中也考虑到维护的问题,不一定就安装在根目录,所以他也有一个相对路径。这个要替换掉才能换。使用phpmyadmin查看图片的属性
  3. 独立页面和日期页没什么好说,影响不大,主要还是分类、标签、文章的url

数据对接:

zblog发了有七八百篇文章,当然大多数是隐藏的,转移到WordPress后还是会隐藏,这个就不要想着看了,因为很多东西用一句话总结就是“知识越多越反动”,我留作学术和思想的成长史就够了,等能公开说的时候一定都拿出来。

……扯远了,回归正题,这些文章的发布日期、浏览次数、评论次数、评论的时间。都只能手动去改了,不过还是可以用数据替换,不要去文章发布界面一个个点鼠标选日期时间。

81 thoughts on “巨大勇气-再见zblog,迎接WordPress

  1. Wonderful article! This is the type of information that are supposed to be shared across the internet.
    Shame on the search engines for not positioning this put
    up upper! Come on over and discuss with my website .

    Thanks =)

  2. I think that everything typed made a great deal of
    sense. But, consider this, suppose you composed a catchier post title?
    I am not suggesting your information is not solid, however what if you added something that grabbed
    people’s attention? I mean 巨大勇气-再见zblog,迎接WordPress – 时间爱人卢航网 is
    kinda plain. You might peek at Yahoo’s home page and watch how they create post titles
    to grab people interested. You might try adding a video or a
    related picture or two to grab readers excited about what you’ve got to
    say. In my opinion, it might make your posts a little bit more interesting.

  3. Hey! I know this is kinda off topic however , I’d figured I’d ask.
    Would you be interested in exchanging links or maybe guest authoring a blog article or vice-versa?
    My site addresses a lot of the same subjects as yours and I believe we could greatly benefit from each other.
    If you happen to be interested feel free to send me
    an e-mail. I look forward to hearing from you! Fantastic
    blog by the way!

  4. I was just looking for this info for a while.
    After 6 hours of continuous Googleing, at last I got it in your website.
    I wonder what is the lack of Google strategy that
    don’t rank this type of informative web sites in top of the list.
    Normally the top websites are full of garbage.

  5. I cherished up to you will receive carried out right here.

    The caricature is tasteful, your authored material stylish.
    nevertheless, you command get bought an shakiness over
    that you want be turning in the following. ill indisputably
    come further until now again since precisely the same
    nearly a lot regularly within case you protect this increase.

  6. I liked up to you will receive carried out proper here.

    The sketch is tasteful, your authored subject matter stylish.
    however, you command get bought an edginess over that you would like be turning in the following.
    unwell no doubt come further earlier once more since
    exactly the similar nearly a lot incessantly within case you
    shield this increase.

  7. Hello There. I found your blog using msn. This is an extremely well written article.
    I’ll be sure to bookmark it and come back to read more of your useful info.
    Thanks for the post. I will certainly comeback.

发表评论

电子邮件地址不会被公开。 必填项已用*标注

答案 : *
12 − 7 =


返回顶部