wordpress 转 solo 导入数据错误

最近迷上了 solo,特别喜欢,捣鼓了好久总算搞定了

原来的博客是 wp,看到有大神出了转换脚本,但是文章怎么都导入不了

烦请大佬给看看,是老的脚本过期了吗?新的 solo 修改了字段?实在是看不懂

image.png

image.png

``

INSERT INTO b3_solo_article

SELECT
posts.id AS oId
,posts.post_title AS articleTitle
,'' AS articleAbstract
,'' AS articleAbstractText
,(SELECT
group_concat(terms.name)
FROM
wp.wp_terms terms,
wp.wp_term_relationships rs
WHERE
terms.term_id = rs.term_taxonomy_id
AND rs.object_id = posts.ID
GROUP BY rs.object_id ) AS articleTags
,(select oId from b3_solo_user LIMIT 1) AS articleAuthorId
,0 AS articleCommentCount
,0 AS articleViewCount
,posts.post_content AS articleContent
,concat('/articles/',year(posts.post_date),'/',LPAD(month(posts.post_date), 2, 0),'/',LPAD(DAY(posts.post_date),2,0),'/',posts.id,'.html') AS articlePermalink
,0 AS articlePutTop
,concat(unix_timestamp(posts.post_date),'000') AS articleCreated
,concat(unix_timestamp(posts.post_date),'000') AS articleUpdated
,RAND() AS articleRandomDouble
,1 AS articleSignId
,1 AS articleCommentable
,'' AS articleViewPwd
,'https://img.hacpai.com/bing/20180320.jpg?imageView2/1/w/1280/h/720/interlace/1/q/100' AS articleImg1URL
,(CASE WHEN posts.post_status = 'publish' THEN 0 ELSE 1 END) AS articleStatus
FROM
wp.wp_posts posts
WHERE posts.post_parent = 0
AND posts.post_type != 'nav_menu_item'
AND posts.post_type != 'page'

欢迎来到这里!

我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。

注册 关于
请输入回帖内容 ...
  • 88250
    订阅者

    建议用 Markdown 导入,直接用数据库迁移的话得熟悉 WP 和 Solo 的表结构,这个我觉得有点难。