SQL dump into XML?

  • Unknown's avatar

    Hello,

    Once upon a time, I had a (WordPress) blog. But life being life, I had to stop bloggin for a while. I backed up my database in a SQL dump, which sits neatly on my C:/drive. I’d like to start up a blog on wordpress.com. Is it possible to import this SQL dump directly into my wordpress.com? If not, how can I convert it into XML?

    Many thanks for all answers…
    Banana

  • Your best bet would be to install WordPress, import your SQL dump there, then export it as XML.

    Depending on how old the SQL dump is, you might have to install an old version of WordPress and then upgrade it after importing your SQL.

  • Unknown's avatar

    If you get stuck, or you have no WP to do this, zip the file and send it to support@wordpress.com and I will send you back the xml file.

    But it really must be zipped.

  • Unknown's avatar

    Hi Mark and Tellyworth,

    Thanks for the replies.

    Mark, are you sure you want me to send that? The zipped file is nearly 2,000 KB itself! But I would totally appreciate that. I’ll wait for your reply before sending it.

  • Unknown's avatar

    2meg ?
    No problem – send that in :)

    (It’s what it unzips to that’ll be interesting, but it’s doable)

  • Unknown's avatar

    Hi Mark,

    I am just in the process of sending the file. It will come from someone called kingainpoland from a gmail address.

    I really appreciate your help on this and the incredibly quick response to my problem!

    Many thanks!

  • Unknown's avatar

    You have mail :)

  • Unknown's avatar

    Many thanks, Mark! I really appreciate this…

    I got as far as the 1st upload and the 1st one went fine, imported no probs…but the second one gives the following message:

    Invalid file

    Please upload a valid WXR (WordPress eXtended RSS) export file.

    Is there anything I should add to each of the subsequent files? The first one (when I looked at it in notepad) had a lot of code and information before the first post. The second (and third) xml file just pretty much went straight into the posts.

    Sorry to be such a pain.

  • Unknown's avatar

    That’s odd. I’ll ask Alex.

  • Unknown's avatar

    ‘<?xml version=”1.0″ encoding=”UTF-8″?>
    <rss version=”2.0″
    xmlns:content=”http://purl.org/rss/1.0/modules/content/”
    xmlns:wfw=”http://wellformedweb.org/CommentAPI/”
    xmlns:dc=”http://purl.org/dc/elements/1.1/”
    xmlns:wp=”http://wordpress.org/export/1.0/”
    >’

    Those lines at the start of each file will allow the import of the files 2-6

    Would you like me to do those and resend (reupload) the files for you?

    Sorry for that delay – the importer had been changed.

  • Unknown's avatar

    Hi Mark!

    I tried to insert the code (between the ‘ marks) into file 2, but that also didn’t work. But what did work is when I copied a huge chunk of text from file 1(starting with ‘<?xml version=”1.0″ encoding=”UTF-8″?>’ and ending with the code just before ‘<item>’) and that seemed to work! I’ll try it with all the other files and get back to you, but I think it might work now.

    Many thanks for all your time and help on this. It’s been a bit frustrating and you’ve really made it much easier!

  • Unknown's avatar

    Mark,

    The import went very well. I’ve got all my old posts, comments and categories! However, there is one snag…in file number 6, I found an entry called r’o8kfbswmag.txt’. It’s not my entry, I can’t remember it ever being there and I’d like to delete it. However, I can’t seem to find it and, of course, I can’t go through an ftp server and get rid of it. Is there any way of deleting that file?

    Many thanks again for all your help!

  • The topic ‘SQL dump into XML?’ is closed to new replies.