0

I'm trying to move some content from another website into blog posts for work, and I need a little bit of help.

Basically my task is to parse a bunch of files into their content, put them into a format that Wordpress understands as a blog post, and upload them.

Problem is, I'm not really seeing a good way to do this -- I would like to be able to have individual blog posts in individual files so I can upload them one at a time. All that I'm seeing right now is a way to take full blogs and upload them, which isn't quite what I want.

I'm also looking for a good format to do this in -- I'm sort of new to this. The content is originally plain text, so I can parse it into whatever format, really. I'm not sure which will be the easiest to build, though, so any help there would be great also.

Thank you!

0

There are many ways to approach this problem depending on the scale of the data we talking about. Also important whether you have to deal with taxonomies or not. And also not clear that the original data is an other wordpress site or something else. I assume it is not.

  • the format that wordpress easily undertands is xml, you can see the structure if you export a default install.
  • Or just make object output of the original content and use 'wp_insert_post()' to add the posts from wordpress.
  • if you have extra data just use 'add_post_meta()' or 'update_post_meta()'.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.