• Hi..

    I have a xoops database, with posts that I want to transfer to wordpress.
    About 200 posts, all posts have the same author and category.

    So I do a select like this to populate an empty and fresh wordpress installation. :

    insert into wp_posts (SELECT storyid AS ID, 1 AS post_author, FROM_UNIXTIME( published ) AS post_date, FROM_UNIXTIME( published ) AS post_date_gmt, bodytext AS post_content, title AS post_title, 0 AS post_category, hometext AS post_excerpt, ‘publish’ AS post_status, ‘closed’ AS comment_status, ‘closed’ AS ping_status, ” AS post_password, storyid AS post_name, ” AS to_ping, ” AS pinged, FROM_UNIXTIME( published ) AS post_modified, FROM_UNIXTIME( published ) AS post_modified_gmt, ” AS post_content_filtered, “” AS post_parent, ” AS guid, ” AS menu_order, “” AS post_type, ” AS post_mime_type, 0 AS comment_count FROM xoops_stories)

    This works fine, no problems running the query. And I can see all the posts in the table wp_posts as expected.

    But from the web GUI in wordpress, there is nothing.
    When I “add new post” from the web GUI. That posts appear as normal.

    Is this not that straight forward or have I forgot something.
    Any relations or something..?

    Best Regards

    Roar 🙂

Viewing 1 replies (of 1 total)
  • Just solved this myself…

    In my sql statement it says : “” AS post_type,

    I changed that to : post AS post_type,

    After changing all post_type to value post, all the posts appear.
    So now everything is fine

Viewing 1 replies (of 1 total)
  • The topic ‘SQL Problems’ is closed to new replies.