• David

    (@cancerkitty)


    I am considering using WordPress as blogging software but I have one big concern. For years, I’ve been making blog-style update on a regular HTML style page. If I decide to use WordPress instead, is there a way that I can add all those old posts into the WordPress archive, and have the date stamps remain accurate (e.g. a post I made in 2003 would be archived as 2003).

    Thanks in advance, and I apologize if this has been posted before. I tried searching, but couldn’t find a good way to phrase the question.

Viewing 9 replies - 1 through 9 (of 9 total)
  • It’s not going to be easy. You’re probably going to have to go through each post one at a time and change the format so you can import one file into WordPress.

    Your best bet might be to convert your static HTML pages into an XML file and import it that way (you’ll still probably have a lot of cleanup to do.) A quick Google search shows several ways to convert HTML to XML.

    good luck!

    Thread Starter David

    (@cancerkitty)

    Okay, I’m sure I can convert them, or go through and add them one at a time if need-be. I just wanted to make sure that I could post-date, and archive my old stuff. You’re saying that, although it’ll be a pain, it’s possible, right?

    Post dating is the easy part — setting a posts time and date is on the Post editor scree in the right side bar.

    Getting all the old posts into WP or into a format that WP can import is what Doo-bee refers to as a pain. πŸ™‚

    Thread Starter David

    (@cancerkitty)

    Well, I sense a lot of copying and pasting in my future.

    Thanks for your help fellas, and especially for the speedy replies.

    I had a similar problem but it was easily resolved. The trick was that my previous notes were in a quite regular format which made it possible to write a short script that picked out the data (title, date, text). The next step was quite easy, this can probably be done on all platforms but I’m using a Mac, I wrote a short Applescript that created a new post in MarsEdit which then sent it to WP. (it’s of course possible to directly use xmlrpc but it was easier to use MarsEdit).

    I did check each post manually (fixing spelling errors) but I didn’t do any copy/paste

    Yeah, you probably *could* write a teensy script that would extract your data for you. In fact, I just had to write a script like this for a client – it was for something totally different, but what it does is search for certain tags and pulls out the content between those tags and output the data onto another page (sort of like a feed). I also have it set to – once it’s pulled the data out – search for certain other tags and “exchange” them to something else for formatting purposes. (for example, if everything’s in a table cell, I’ll have it look for the <tr><td> stuff and replabe that with <br />)

    If you’re lucky enough to have formatted all of your old posts in a simple manner – and the same all the way throughout each manual post, then the script might work for you. Unfortunately, I only created this for the one client – and it’s pretty much formatted solely for this client’s site, so if I were to convert it to extract data for the general public, it’d take a lot of extra work to accomplish. But it *is* possible.

    If you’re any good at programming at all (and I’m not the best by far, but I know enough to get around), then I’d be happy to send the script to you and you can fiddle with it to see if you can make it work for you.

    But anyway, as Handy said – the postdating is the easy part πŸ˜‰ It getting it in there that’s gonna be the PITA.

    Thread Starter David

    (@cancerkitty)

    Well, I can tell you that I most likely did not format the old blog posts with any sort of consistency, which is one of the reasons I’m looking for something new.

    I’m not a programmer by any stretch of the imagination, but I wouldn’t mind taking a look at what you made. It most likely wouldn’t help me, but you never know. πŸ™‚

    Note that it might not need to be too consistent, with the help of regular expressions it’s possible to do pretty advanced pattern matching and find very differently formatted posts.

    You’ll need to send me your email address – don’t post it here unless you format it a bit πŸ™‚ If you don’t want it to be public, then just email me from my site’s contact form πŸ™‚

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Adding old, Non-WordPress content to archives’ is closed to new replies.