WordPress.org

Ready to get started?Download WordPress

Forums

Importing Static HTML Files to WP Posts (11 posts)

  1. CaptainBlue
    Member
    Posted 5 years ago #

    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.

  2. boardtc
    Member
    Posted 5 years ago #

    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! :-(

  3. roymcmorran
    Member
    Posted 5 years ago #

    Has anyone found a way to do this?

  4. whooami
    Member
    Posted 5 years ago #

  5. KD Sarge
    Member
    Posted 5 years ago #

    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?

  6. cutegaara
    Member
    Posted 5 years ago #

    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!!!

  7. sn315on
    Member
    Posted 5 years ago #

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

  8. sn315on
    Member
    Posted 5 years ago #

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

  9. Matt
    Member
    Posted 5 years ago #

    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.

  10. cryonics
    Member
    Posted 5 years ago #

    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.

  11. prodos
    Member
    Posted 4 years ago #

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

    I came across this plugin:
    http://wordpress.org/extend/plugins/import-html-pages/

    Will try it out in the next day or two.

Topic Closed

This topic has been closed to new replies.

About this Topic