将 Drupal 6 导出到 WordPress 最新版本(3.2.1?)

发布于 2024-12-08 10:24:10 字数 1459 浏览 0 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

花期渐远 2024-12-15 10:24:10

无论他们想告诉你什么,WP 仍然作为一个博客平台才有效(相信我,我在这方面有很多经验)。许多人对其核心功能进行了扩展,使其可以比原来做更多的事情,但这些扩展充其量是有限的。 Drupal 是专门为扩展而构建的,因此我们开发人员可以轻松地扩展它。

话虽这么说(我的小咆哮已经结束了!),这段 SQL 会让你开始......它将把基本内容从 node 表提取到 WordPress wp_posts 表。

INSERT INTO wp23.wp_posts (
ID, post_author, post_date, post_date_gmt, post_content, post_title, post_excerpt, post_name, post_modified, post_modified_gmt, post_type)

SELECT node.nid, node.uid, FROM_UNIXTIME(node.created), FROM_UNIXTIME(node.created), node_revisions.body, node.title, node_revisions.teaser, concat('node/', node.nid), FROM_UNIXTIME(node.changed), FROM_UNIXTIME(node.changed),'page'
FROM drupal.node, drupal.node_revisions WHERE node.type = 'page' AND node.nid = node_revisions.nid

不幸的是,没有简单的方法可以自动提取 CCK (D6) 或 core (D7) 字段,因为 Drupal/Wordpress 中的字段存储有很大不同;您必须检查表格并根据您添加的字段编写自定义脚本。

希望有所帮助

这些链接可能也会有所帮助,第一个链接是上述 SQL 的来源:

如何从 Drupal 迁移到 WordPress — 导出和导入 Mysql 脚本
将 Drupal 迁移到 Wordpress

WP is still only properly effective as a blogging platform no matter what they want to tell you (trust me I have a lot of experience in this area). Various people have extended upon its core functionality so that it can do more than it originally did, but these extensions are strained at best. Drupal was built specifically to be extended, and thus we developers can extend it painlessly.

That being said though (and with my mini-rant out of the way!), this bit of SQL will start you off...it will pull in the basic content from the node table to the wordpress wp_posts table.

INSERT INTO wp23.wp_posts (
ID, post_author, post_date, post_date_gmt, post_content, post_title, post_excerpt, post_name, post_modified, post_modified_gmt, post_type)

SELECT node.nid, node.uid, FROM_UNIXTIME(node.created), FROM_UNIXTIME(node.created), node_revisions.body, node.title, node_revisions.teaser, concat('node/', node.nid), FROM_UNIXTIME(node.changed), FROM_UNIXTIME(node.changed),'page'
FROM drupal.node, drupal.node_revisions WHERE node.type = 'page' AND node.nid = node_revisions.nid

Unfortunately there is no easy way to automatically pull in CCK (D6) or core (D7) fields because field storage is vastly different in Drupal/Wordpress; you'll have to examine the tables and write a custom script depending on the fields you have added.

Hope that helps

These links will probably help out too, the first one is where the above SQL came from:

How To Migrate From Drupal To WordPress — Export And Import Mysql Script
Migrating Drupal to Wordpress

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文