• justinreach

    (@justinreach)


    Hi WordPressers –

    I have a 16 year old web site, with blog entries dating back to 1996.

    I want to use WordPress to write new blog entries. When I create a new blog entry in WordPress, I want the blog entry to be written as a flat .html file into the same directory structure where my archives exist. So,

    https://links.net/daze/2010/11/25-thanksgiving-grace-spoken-with-family-before-a-meal.html

    putting new entries into /daze/2010 or /daze/2011 etc.

    I don’t use comments, I don’t care if the templates and widgets ever get updated. I’m happy if that page is a static page based on when it was last touched by WordPress.

    Looking through the forums here, there are a number of people looking for similar things: supercache and wget are suggested here (2 years ago), and wget is suggested here (3 years ago).

    WP-Super-Cache seems powerful, but I can’t seem to get it to output .html files into my /daze directory, and I can’t find instructions online to help me do that. wget seems like it will be a challenge to architect around my various directories.

    Any advice here? How can I use WordPress 3.0+ to output static HTML files for new posts into an existing directory structure? Thanks for your time!

Viewing 7 replies - 1 through 7 (of 7 total)
  • If you absolutely don’t need a .html extension (and there’s really no need for it) then Supercache will do the job as it has a “preload” function that will create cached versions of all your posts and periodically reload them. The files aren’t written to the /daze directory, they’d go into /daze/wp-content/cache/supercache/hostname/ and they’re served by mod_rewrite rules or PHP, whichever you prefer.

    If you’re worried about links going stale then you can include the .html extension in your permalink but I don’t think it’ll work too well with the way Supercache caches files. Otherwise you can redirect index.html -> / requests with a small chunk of mod_rewrite magic.

    Thread Starter justinreach

    (@justinreach)

    Thanks for the swift reply here! Reading what you wrote donnacha, it doesn’t sound like “output static HTML into my existing archives” so I think I’ll have to keep looking.

    “.html” I’d like to keep for consistency, and, well, because I want to have flat .html files in my existing directories! Hopefully I can wrestle WordPress to output flat HTML in 2010 without too much struggle.

    It should be possible but yours is an edge case unfortunately. If you wanted, you could keep your existing archive and “start afresh” with WordPress for new posts. Don’t get hung up over this one feature as WordPress is so rich and flexible that you’d be missing out if you were to abandon it.

    Thread Starter justinreach

    (@justinreach)

    I need to keep my archives of all my posts in static html files. Unfortunately, I am quite “hung up” on this feature ??

    I could use Movable Type to readily generated static HTML pages, but MT has no iOS editor and there’s much more community development happening for WordPress.

    Hopefully there’s some ready way to make this happen! I’m posting here in the forums to see what I can learn. A friend suggested I edit wp-cache-phase2.php but I haven’t figured that out yet.

    Thread Starter justinreach

    (@justinreach)

    Here’s a more detailed guide to using wget. However useful, for now I’m still searching for the direct static html output solution within WordPress 3.0+ & it’s plugins!

    penmachine

    (@penmachine)

    Look at the Really Static plugin, which may do exactly what you need:

    https://www.ads-software.com/extend/plugins/really-static/

    I considered it before deciding to use Movable Type for my personal site, precisely because of its static-file publishing:

    https://www.penmachine.com/2010/05/movable-type-static-files-really-work

    phillwv

    (@phillwv)

    Penmachine, I looked at your MT site (& read carefully as time permits) but didn’t see further mention of WP’s really-static plugin.

    Can you say why that didn’t keep you with WP? I would rather stay with WP even if capable of MT’s nerd factor.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘generating static HTML pages from WP posts’ is closed to new replies.