Jump to content

hosted wordpress.com xml to PW


Marty Walker
 Share

Recommended Posts

I've got a wee job I will probably need some help with if the client goes ahead with it.

I have an XML export of a hosted wordpress.com site (just posts, not pages and they don't let you have an sql file) I need moved into a PW blog tree. I technically know nothing about XML (and I'm not copy/pasting) so I'd appreciate some help with it.

Cheers

martin [at] smd.net.au

Link to comment
Share on other sites

There are multiple ways to handle XML in PHP, but for simplest tasks (reading) I prefer SimpleXML. After that it's all about iterating posts in XML and creating matching pages for them via API.

Hope this helps a bit.

PS. I did notice that you posted this on jobs board, but still wanted to point out that the XML part is really nothing to be worried about. If you're familiar with handling ProcessWire content via API, this should be a piece of cake, unless post data from WP is very complex :)

  • Like 3
Link to comment
Share on other sites

How complex can it be if it's just posts? :)

You also have the PHP's own XML parser that I find quite easy to work with. Or maybe you can even convert that XML to CSV and use Ryan's module to import it.

  • Like 1
Link to comment
Share on other sites

Well I can give you the parser for free: :)

Just put the "wp-import" folder in the same directory as "site" and "wire" and add the name of your xml file in the folders "index.php".

---

And if you still prefer a real module you can support development via (for example) PayPal mail@nico.is :)

---

Edit:

Forgot to add the attachment :)

wp-import.zip

  • Like 8
Link to comment
Share on other sites

  • 1 month later...

Nico - this reminds me (not that I had really forgotten, but have been REALLY busy), that I need to do a little work associated with this for you. I really will try to get to it shortly!

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...