Support » Fixing WordPress » Importing Static HTML Files to WP Posts

  • I have a site with around 500 static HTML pages, each one of which is an article that has been published. The pages are all written around an HTML template, so that if need be, the body text could probably be extracted in some way (not sure how, yet, but there you go).

    Is there any way to batch import those HTML pages as individual posts? Each article has a “this article was first published on dd mmmm yyyy” which could potentially be used as the post date.

Viewing 10 replies - 1 through 10 (of 10 total)
  • I have been looking to also import a number of html pages. In the settings | manage | Import page there are option to import from blogger and lots of other system but not just regular html files! 🙁

    Has anyone found a way to do this?

    Good lord, is that the only way–about five steps, and one at a time? I have over a thousand posts.

    I looked for a free blog that WOULD accept my import then let me translate it, but I didn’t find it. Anyone else have any ideas?

    I also have the same problem.
    Plus even if the html files are accessible via internet, they are still not search-able…
    I guess those thousands of htm files really needs to be imported as a blog or page on WordPress…. But I really can’t do that one at a time.

    Please help!!!

    It would be so great if there was a way to do this. I have 7 years of blog posts saved in HTML files.

    Any way to do this vs. just copy and pasting?

    We’re talking about programming, so yes there are ways.

    You have to ask yourself “am I going to pay to have someone do this?” or “am I going to do it myself?”

    But to expect a tool (I suspect you’re thinking there would be something free out there) to do this is asking too much.

    Why? Think about what you need to do: look for and capture post title, post body, date stamp, and author, at the very minimum, from a folder(?) of .html files, one after another. Any of those files may be structurally poorly written, so that the info isn’t where the script is looking for it. What format is the date in? Does it need to get translated so WP understands it? Is there HTML markup within the text? Should that be stripped or preserved? (And the hundreds of other technical questions that will come up.)

    Then you need to format/save that in a way that’s readable to WordPress, either by injecting it directly into the database (nightmare) or formatting it for XML import (easier).

    I imagine if someone did write something to be so universal as to take almost any file(s) arbitrarily and convert it to work (well) with WordPress, it would be a massive effort with little reward.

    But writing it specifically for an specific case would probably be a fun project for an individual who needs it for his own purposes. Just my $.02.

    No so difficult in my mind. A such tool exists for ModX.

    You can make a script to read all pages, get the content and generate SQL requests to add it as post…
    I would consider to do it some day.

    I’m also wanting to import a large batch of html pages to a WordPress site.

    I came across this plugin:

    Will try it out in the next day or two.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Importing Static HTML Files to WP Posts’ is closed to new replies.