How to Import Data with WordPress (19 posts)

  1. Lorelle
    Posted 11 years ago #

    I have a TON of stuff in html format from my own static html pages and I can easily reformat it to MT format or whatever to prepare it for using the Mt-import script. However, I can't find a clear example of the layout form used by MT to base my data conversion on.

    There are tons of information on the scripts to use but no examples of how the data should look in preparation for import. I've been searching for this info for three weeks! HELP!!!!!

  2. wshi88
    Posted 11 years ago #

    Do you want to import those static files as posts that get stored in the database?

    If not, you can check out the ezstatic.php plugin, which will display static pages, but not storing them in the database.

  3. Lorelle
    Posted 11 years ago #

    I need the data, the article content, posts, author, links, et al, all of it into the database. Right now, the whole thing is in HTML and I've figured out how to quickly (sorta) covert whole sections into a format that will import - BUT......

    drum roll.....horns blare......


    Can you tell I'm a little bit desperate?

  4. Anonymous
    Posted 11 years ago #


    scroll down for the samples. MT uses the same format for exporting as it does for importing.

  5. Lorelle
    Posted 11 years ago #

    Problem. I have html in the content (body) of my stuff. What about the quote marks?

    For example, I have lists and boxes of information within the stories. How do I handle those? If they are all XML formatted, will they still import just fine or screw things up?

  6. Lorelle
    Posted 11 years ago #


    I'm preparing my data for import into WordPress and panicking a little.

    1. QUOTES - what about the use of quotes on html code inside of the "body"??????

    2. KEYWORDS - I've worked very hard to make the keywords appropriate for every single page, so are these lost forever or can they be imported?

    3. META TAGS - I also have unique and lovingly crafted Descriptions and other meta tags...are these lost to the fray as well?


  7. NuclearMoose
    Posted 11 years ago #

    Does this page help at all?

    If not, could you suggest ways to improve the information?

  8. Anonymous
    Posted 11 years ago #

    You could try putting together a test file with those fields and see whether WP does anything with the information. You could also look into using the RSS import feature, though I don't know enough about RSS to tell you whether it would be a better format for your needs than the MT one.

  9. Lorelle
    Posted 11 years ago #

    The lovely "importing from other blogging software" and I are very old friends now. But no help. Zip. I can't be the only one out here who is doing this from scratch.

    To improve it, add a section on how to import from strictly HTML files. Answers need to be given to:

    1. FORMAT - How should it look in order to be imported.

    2. FIELDS - Which fields (HTML sections, DIVs) are imported (like content, author, etc. If there are comments, which a lot of HTML pages don't have, then how to include those. Meta Tags are NOT imported, though they should be (especially descriptions and keywords!) and they need to know that in order to remove them)

    3. QUOTES - Are quotes ignored within a section, such as the BODY as they would be if the information was posted directly? Do they need to be changed to ' or " or left alone?

    4. SYTLES and CSS - I have pages with multiple style sheets unique to that page as well as the very occassional embedded style [<p style="border:solid 1px blue; padding:5px">] and will those work and how to deal with them?

    5. HTML - Does the HTML within the content have to be stripped or can it remain? For instance, I have boxes with information and examples relating to the content. And what about <p>? Or must this be STATICIZED or whatever that is called?

    6. WHICH FORMAT IS BEST? Is the MT format the best one to follow for converting the information into a format for importing?

    7. XML - Can the code stay in HTML or must it be in XML form before importing (with all the <br> changed to ?

    Oh, I'll have more....I'm sure. I'm making a huge step-by-step agony list as I go. There are a lot of compromises that have to be made when making the conversion from static HTML pages to WordPress as much of the info must be lost like Meta Tags, but I don't want to compromise on code within my content, and this is what I'm agonizing over.

    I'm desperate. I've been poking at this and leaving it and me with bloody sores for three weeks. I'm now just plowing through with little or no information - trial by fire. I really can't be the ONLY person who has converted HTML for import into WordPress.

    Thanks for the help.

    Oh, PS: I've read how some people have made the RSS import work for them, but what is it? What format does it need? All my questions still apply and the importing page doesn't give any specifics.

  10. NuclearMoose
    Posted 11 years ago #

    Have you tried popping into the #wordpress channel on IRC? Often there is a few people there who may be able to often some assistance.

  11. Lorelle
    Posted 11 years ago #

    No. Don't know a thing about it. But that's live chat, right? Sitting around waiting for an answer? I do that here. What's the difference?

  12. carthik
    Posted 11 years ago #

    Hey, lorelle, sorry if it's been frustrating so far - but basically, it's easy to import text files formatted according to the mt import file format.

    Importing an html document would be very difficult, so can you create a text file with all the "entries" formatted in the mt format?

    Where do you html pages come from, what created them?

  13. NuclearMoose
    Posted 11 years ago #

    "No. Don't know a thing about it. But that's live chat, right? Sitting around waiting for an answer? I do that here. What's the difference"

    Sorry...just trying to offer suggestions where I can. If I could give you the answers you need, I would.

  14. Lorelle
    Posted 11 years ago #

    I know you would. You're great about that.

    What is the WordPress IRC?

  15. Mark (podz)
    Support Maven
    Posted 11 years ago #

  16. Lorelle
    Posted 11 years ago #

    I finally figured out the IRC thing and I'll look for help there, but if ANYONE has any answers to the above questions, please post them so all can learn.


  17. Lorelle
    Posted 11 years ago #

    Instead of starting a new post, I'm going to continue pulling out my hair here and hope that someone has the answers.

    Following all the information I could gather about importing into WP using the import-mt.php script, I laid out the data into an "import.txt" file with eight-dash record dividers and 5-dash field dividers, like this format:


    I don't know if I need the \n but this is per the instructions given at Moveable Type - Import and Carthik's Moveable Type to WordPress instructions.

    There were 65 posts in the import file, which made the total file size almost 2 megs, so I did a smaller test file of 3 posts, making it a 62K file.

    I ran the WP v1.5 import-mt.php file and everything looked wonderful, following all the instructions. I hit the "Let's Go" and it said it worked. Lovely. I had three entries add to the database. The titles of the tree entries were listed perfectly. I click the next link to go to the site and there is nothing but an entry for the title of the third post in the file with no content. I click on it and it says "not found".

    I checked the database and its the same.

    So I started over with the import-mt.php file from scriptygoddess, per other instructions within the support forums, and that got me no where but with an error just activating the import-mt.php file. So I reuploaded the latest v1.5 import-mt file and tried it again with the same results - says three posts loaded, only the title of the third one shows up with no data.

    I have html code in the file under BODY: which I'm told will be "escaped out" and ignored by the conversion. I've been through these three entries with a fine tooth comb and have played around with it a bit with the same results.

    So questions are:

    1. Any idea on what might be wrong and how to fix it? If I had an error, this would be simple, but there is no error.

    2. Which import-mt.php should I go with - the one with the nightlies or scriptygoddess?

    3. Do I need the \n line break inside of the data or not? Am I missing something in the formatting?

    4. Is there a specific order to the mt file, like title, body, comment, excerpt...or comment, excerpts, title, body... or will the import-mt figure it out by itself?

    5. Can I upload the information right to the database and skip all this craziness? And what format should it be in to account for all the quote marks around the html?

    Thanks for your help. Someone must have figured out how to import straight html stuff to the database before...where are yooooouuuu? Help me.


  18. Lorelle
    Posted 11 years ago #

    I'm working overtime trying everything to upload my data directly into the wp-posts table but I'm having trouble and I need help. I've explained it all on the discussion: http://wordpress.org/support/topic.php?id=20768 and I really need some help with this.


  19. ccsachs
    Posted 9 years ago #

    just wondering if anything was solved as I have numerous html files that I would like loaded as posts in wordpress.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.