Support » Installing WordPress » How can I convert massive blog to WordPress?

  • Hi,

    I have a blog ( which is just update manually via Dreamweaver every day. I’m thinking about using WordPress but I have no idea how to go about converting the site, so to speak.

    Obviously I can just copy and paste each entry but with over 4 years of archives that’s not realistic.

    Is there any script I could use to convert my entries into a format that can then be imported into WordPress?

    Basically there are two archives pages per month (eg. april2006part1.php and april2006part2.php). Each page contains around 15 entries.

    If anyone could offer any advice I’d appreciate it.


Viewing 8 replies - 1 through 8 (of 8 total)
  • Wow, that’s pretty sharp if you made that blog without any blog software. Are your posts saved into a database?

    I think you’d be happy with how much easier it would be to post in WordPress. I know it could be a pain to move every post over, I have 5 years worth of posts I’m slowly but surely moving into WordPress… luckily mine are all text so it’s just cut-paste-publish.

    No, they’re not in a database, they’re just PHP pages.

    Yep, it’s amazing how you did that.

    I suppose one option is to begin afresh with WordPress – for new posts and comments – and to include links to your previous archives, untouched, in the WordPress sidebar. Then when someone requests an “old” archive it loads a non-WordPress page but with exactly the same appearance as the WordPress pages.

    Maybe you could style everything so the whole site is seamless, except that the “old” and “new” archives would have a different section in the sidebar.

    Moderator Samuel Wood (Otto)

    (@otto42) Admin


    The short of it is that you’ll need to get all your posts organized into some standard format. This will probably require writing code or manually screwing around with your pages until you have all your posts in some way.

    At minimum, the info you want to have for each post is this:

    Once you have this information, you can write some PHP import code. Look at the various import codes in wp-admin/import for examples. The RSS one is fairly straightforward (look for the “import_posts()” function). The basic idea is that you read your post information into an array, then make a call to wp_insert_post() to insert your post. There’s a few gotchas there, you’ll want to set the post_status in the array to “published” in order for it to post properly, and you may have to fiddle with the date format. Also, adding categories to the post is done afterwards with a call to wp_create_categories().

    But there’s no way you’re going to be able to do it semi-automatically without a) cleaning up your site to get some more consise form of the posts and b) writing some importing code.

    If its all completely custom formatted php, that’s going to be pretty tough.

    I mean, I could think of an HTML-scraper process which would load up a page and grab content from headings and figure out the body content and build a post from it. But, you’ve got tables inside tables inside tables, so properly grabbing the block might be tricky (you’d know best). You also already have formatting that you (might) want to strip (tables, Ps, BRs, etc.). Hard to say.

    Coming in from the RSS feed is doable, if your RSS code supports your entire archives. But you currently don’t have images in the feed.

    Retaining every little touch and detail of your old blog, coming from a completely handcoded format, will be tough without a lot of work, though you could get ‘close’ with some work.

    I agree with the previous reader — might be best to leave the old blog as-is with archive links back, and move ahead…


    Ok, thank you all for your help.

    Maybe the best idea is to go WordPress from here on in and leave the existing archives. It’s certainly less work.

    Thanks again, much appreciated.

    No problem, glad to help — and glad to be appreciated! 😉

    Launching tomorrow with WordPress. Thanks again!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How can I convert massive blog to WordPress?’ is closed to new replies.