dell perch330_从WordPress迁移到Perch

dell perch330

When I first started writing this blog, the software was a custom Classic ASP solution that I put together running off an Access database. I believe the next incarnation of the site was running on Movable Type, and at some point I imported it all into WordPress. On WordPress it has remained until last week when I finally took the plunge and imported 10 years worth of blogposts into our Perch Blog App and started running it on our own software.

当我第一次开始撰写此博客时,该软件是一个自定义的Classic ASP解决方案,我将其组合在一起运行于Access数据库上。 我相信该网站的下一个版本将在Movable Type上运行,并且在某些时候我将其全部导入WordPress。 在WordPress上,这种情况一直持续到上周,当时我终于大跌眼镜,并将价值10年的博客文章导入到我们的Perch Blog App中,并开始在我们自己的软件上运行它。

When we launched Perch we had no intention of developing a fully featured blog add-on. The original Blog App was a simple news app, mostly aimed at the sort of company website that just wants a way to post latest news. However, our Perchers really did want a proper blog for Perch. So the Perch 2 version of Blog has comments, and all of the functionality you might need for a blog. Almost as soon as we launched Perch 2 and the new Blog App we started to get requests for a WordPress importer. Using the export from my blog (a ten year old blog makes a pretty good test case) we set about creating one.

当我们启动Perch时,我们无意开发功能齐全的博客插件。 最初的Blog App是一个简单的新闻应用程序,主要针对那种只想发布最新新闻的公司网站。 但是,我们的Perchers确实确实想要一个适合Perch的博客。 因此,Perch 2版本的Blog具有注释,以及博客可能需要的所有功能。 几乎在我们启动Perch 2和新的Blog App之后,我们就开始收到有关WordPress进口商的请求。 我们开始使用我博客的导出内容(已有十年历史的博客做了一个很好的测试用例)。

By this point my site was a hybrid of WordPress and Perch. I had taken the pages detailing my Presentations and Writing out of the cumbersome WordPress Pages feature a while ago and installed Perch to manage those. To move my blog I wanted to be sure I could import all of the posts and comments and preserve my rewritten URLs to remain as they were with WordPress. I think these things are pretty much what anyone would expect when moving from one piece of software to another.

到目前为止,我的网站是WordPress和Perch的混合体。 不久前,我从繁琐的WordPress Pages功能中提取了详细介绍和书写的页面,并安装了Perch来管理这些页面。 要移动我的博客,我想确保我可以导入所有帖子和评论,并保留我重写的URL ,使其与WordPress一样。 我认为这些东西几乎是任何人从一种软件迁移到另一种软件时所期望的。

I took a local copy of the site and database and installed the Perch Blog App. Importing the posts was easy due to the brilliant job Drew did on creating an importer. To import posts and comments you simply need to export the posts in WordPress, drop the text file into the import_data folder in the Blog App and run the importer from within the Perch Admin.

我获取了站点和数据库的本地副本,并安装了Perch Blog App。 由于Drew在创建进口商方面所做的出色工作,因此导入帖子很容易。 要导入帖子和评论,您只需要在WordPress中导出帖子,将文本文件拖放到Blog App的import_data文件夹中,然后从Perch Admin中运行导入程序。

Installing the Blog App installs the admin side of Blog. So the WordPress posts were still showing on the front-end of my site. Perch has no concept of “themes” and doesn’t take over your entire site. To actually display Perch blog posts you need to create three PHP pages. One displays latest posts, one displays an individual post filtered on the post slug passed on the QueryString, and if you want to create archives you might want a third page that shows the correct data for the archive you are requesting – filtering on category for example.

安装Blog应用程序将安装Blog的管理端。 因此,WordPress帖子仍显示在我的网站的前端。 Perch没有“主题”的概念,并且不会接管整个网站。 要实际显示Perch博客文章,您需要创建三个PHP页面。 一个显示最新的帖子,一个显示根据QueryString传递的帖子信息过滤的单个帖子,如果要创建档案,则可能需要第三页显示所需的档案的正确数据-例如按类别过滤。

In the Perch Blog App download zip you get a folder of example pages that can be used to create your blog pages, and in fact I used these, just removing the Perch default mark-up around the area where I wanted my listing and posts to display and adding my own.

在Perch Blog App下载zip中,您可以找到示例页面的文件夹,该文件夹可用于创建您的博客页面,实际上,我使用了这些示例页面,只是删除了我希望其列表和帖子发布到的区域周围的Perch默认标记。显示并添加我自己的。

My old blog posts lived in /archives and the homepage of my site was a full listing. I actually wanted to remove a big list of posts from my homepage and just display a single, latest post there. So I dropped the example pages into a folder named /archives – I then commented out in my .htaccess file the WordPress rules so that the WordPress posts did not display. If you want your posts to display on your homepage then you would simply add the tag <?php perch_blog_recent_posts(10); ?> directly to the homepage.

我的旧博客帖子位于/ archives中,并且我网站的主页是完整列表。 我实际上是想从主页上删除大量的帖子,而只在其中显示一个最新的帖子。 因此,我将示例页面放到名为/ archives的文件夹中–然后,我在.htaccess文件中注释了WordPress规则,以便WordPress帖子不显示。 如果您希望您的帖子显示在首页上,则只需添加标签<?php perch_blog_recent_posts(10); ?> <?php perch_blog_recent_posts(10); ?>直接转到主页。

As with everything in Perch the mark-up around my posts, listings and anything else displayed is completely up to me. Unlike WordPress you won’t find markup mixed in with PHP tags. So I edited some of the default HTML templates to produce the mark-up that matched my existing CSS – trying to make things easy for myself as I was doing all of this three hours before leaving for Future of Web Apps in London.

与Perch中的所有内容一样,围绕我的帖子,列表和显示的其他内容的标记完全取决于我。 与WordPress不同,您不会发现标记与PHP标记混合在一起。 因此,我编辑了一些默认的HTML模板以产生与现有CSS匹配的标记-尝试使这一切变得容易,因为我在离开伦敦的Future of Web Apps之前的这三个小时中都这样做了。

My posts now all displayed but the URL used a QueryString with a parameter of the post, category or tag slug. I wanted to make sure that the new URLs were identical to my old WordPress URLs. I achieved this with mod_rewrite rules in my .htaccess file as described in the Perch documentation. In order to make sure that my paging generated the correct URLs I used the new rewrite attribute added to Perch 2.0.7. The requirement for this rewrite attribute was the only factor missing from my initial test of the conversion and so we added it to the development build of Perch and pushed that out today as functionality for everyone.

现在我的帖子全部显示了,但是URL使用了QueryString,其参数为post,category或tag slug。 我想确保新的URL与旧的WordPress URL相同。 如Perch文档中所述, 我通过.htaccess文件中的mod_rewrite规则实现了此目的。 为了确保分页生成正确的URL,我使用了添加到Perch 2.0.7的新的重写属性 。 这个重写属性的要求是我最初进行转换测试时唯一缺少的因素,因此我们将其添加到Perch的开发版本中,并将其作为所有人的功能推出。

I was now able to remove WordPress from my site and deploy the Perch version. As far as I can see so far everything converted smoothly. Part of the reason for doing this was that by “eating my own dogfood” I would be able to spot problems other users might have. When I’m posting to my blog I’m just another user of Perch. For that reason, I was determined that if I used Perch it would be stock Perch – hence when I came across the issue with rewriting paging we needed a solution we could ship.

现在,我可以从我的站点中删除WordPress并部署Perch版本。 据我所知,到目前为止,一切都顺利进行了转换。 这样做的部分原因是,通过“吃自己的狗粮”,我可以发现其他用户可能遇到的问题。 当我发布到博客时,我只是Perch的另一个用户。 因此,我确定如果使用Perch,那将是库存的Perch –因此,当我在重写分页时遇到问题时,我们需要一个可以交付的解决方案。

I’m hoping that our efforts in making Perch super efficient for high traffic sites will prevent the endless problems I have had with WordPress under load. This blog is a great test of that scalability and anything I do discover will make it back into the product. I’m also very excited about how easy using Perch makes adding new information to posts and being able to integrate posts with the rest of the site, rather than standing alone.

我希望我们为使Perch对高流量站点超高效而做出的努力将防止我在WordPress负载下遇到的无尽问题。 该博客对可伸缩性进行了很好的测试,我发现的任何内容都将使它重新回到产品中。 对于使用Perch使得添加新信息到帖子中以及将帖子与网站的其余部分集成在一起而不是一个人呆着,我也感到非常兴奋。

翻译自: https://rachelandrew.co.uk/archives/2012/10/21/moving-from-wordpress-to-perch/

dell perch330

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值