Forum Discussion

kcrawford's avatar
kcrawford
Contributor
12 years ago

Import Wordpress Blog into Lithium....Available Methods

Can anyone tell me what the most efficient way to import wordpress blog data into our lithium community would be? Really, I would liek to start the blog feature as our company uses mostly tkb and discussions. Perhaps there is a quick and dirty import process? Could this be done rapidly with Lithium's REST API? All answers appreciated.

 

Thanks

  • DougS's avatar
    DougS
    Khoros Oracle
    You could use the REST API to create the blogs (use the /nodes/type/blog/add call), create the blog posts (use the /boards/id/<blog id>/messages/post call), and blog post comments (use either the /messages/id/<unique message id/reply call or the /boards/id/<blog id>/messages/id/<board-specific message id>/reply call).

    In your REST calls to create the blog article and replies, you can pass the "message.author" parameter to post the message as another user (you need to make the REST call as an admin user who had the "switch user" permission). You can also backdate the message using the "message.post_date" parameter (I think you need to make the REST call as an admin user to do this as well).

    If you have Wordpress blog categories you would like to carry over, you can include them as labels (the Lithium analog to Wordpress categories) -- when you make the messages/post call, just include your categories in the "label.labels" POST parameter.

    Hope that helps!

    -Doug
    • iftomkins's avatar
      iftomkins
      Maven

      We're also working on importing our Wordpress Blog into Lithium.

       

      IzabelaU: Has the documentation been updated, as you mentioned?

       

      kcrawford: Did you end up completing your Wordpress import? If so, how did it work out? If you're willing, any code you're willing to share from the Wordpress-Lithium API import would be much appreciated to get a jump start.

      • SuzieH's avatar
        SuzieH
        Khoros Alumni (Retired)

        Hi iftomkins, 

        The documentation has been updated in that we have removed message.post_date as an accepted parameter. This means that filing a support ticket is still required to edit the post dates. Please post an idea for this to our idea exchange. I know this would be useful for many customers.