drupal转worldpress
用Drupal太灵活了,灵活的我都搞不定了。所以我投向了worldpress.对比了一下表结构。参考网上的说明搞出了:
use support;
delete from wp_posts;
delete from wp_comments;
# posts
INSERT INTO
wp_posts (id, post_date, post_content, post_title,
post_excerpt, post_name, post_modified)
SELECT DISTINCT
n.nid, FROM_UNIXTIME(created), body, n.title,
teaser,
REPLACE(REPLACE(REPLACE(REPLACE(LOWER(n.title),’ ‘, ‘_’),’.\', ‘_’),’,\', ‘_’),’+\', ‘_’),
FROM_UNIXTIME(changed)
FROM drupal_bak.node n, drupal_bak.node_revisions r
WHERE n.vid = r.vid;
# comments
INSERT INTO
wp_comments
(comment_post_ID, comment_date, comment_content, comment_parent, comment_author, comment_author_email, comment_author_url)
SELECT
nid, FROM_UNIXTIME(timestamp),
comment, thread, name, mail, homepage
FROM drupal_bak.comments ;
# update comments count on wp_posts table
UPDATE `wp_posts` SET `comment_count` = (SELECT COUNT(`comment_post_id`) FROM `wp_comments` WHERE `wp_posts`.`id` = `wp_comments`.`comment_post_id`);
# fix post slugs. first we have to remove the duplicate _____ chars, then replace that with a single - char
UPDATE wp_posts set post_name = REPLACE(post_name, ‘__’, ‘_’);
UPDATE wp_posts set post_name = REPLACE(post_name, ‘__’, ‘_’);
UPDATE wp_posts set post_name = REPLACE(post_name, ‘__’, ‘_’);
UPDATE wp_posts set post_name = REPLACE(post_name, ‘__’, ‘_’);
UPDATE wp_posts set post_name = REPLACE(post_name, ‘_’, ‘-’);
然后就可以看到worldpress工作了。
扫一扫订阅我的微信号:IT技术博客大学习
- 作者:wubx 来源: MySQL支持
- 标签: drupal worldpress
- 发布时间:2009-11-30 09:04:35
-
[1174] WordPress插件开发 -- 在插件使用 -
[72] 解决 nginx 反向代理网页首尾出现神秘字 -
[44] web开发设计人员不可不用的在线web工具和 -
[42] Java开发岗位面试题归类汇总 -
[32] 手机产品设计方向 -
[32] Rax 系列教程(长列表) -
[31] 一句话crontab实现防ssh暴力破解 -
[28] 如何建立合适的索引? -
[27] 程序员疫苗:代码注入 -
[26] oracle技术方面的路线