I need a WordPress evangelist

I want to set up a blog at tolstoy.com. I currently have three MovableType blogs, all of which fit under MT's non-commercial banner: this one, BigMediaBlog.com, and BoreAmerica.com. Since the blog at tolstoy.com would be construed as commercial and it would put me over my three blogs/person limit anyway, I would probably end up having to pay MT $199, something which I'd rather avoid. I might end up doing that because, even though MT is written in the horrific language of Perl, I'm familiar with it and I know I can make it do what I want to do.

So, will WordPress allow me to do the following?

1. Here's the structure I want. This is mostly non-negotiable. I don't want files named *.php with or without any numerical identifiers on the end:
main page: tolstoy.com/blog/index.html
posts: tolstoy.com/blog/this-is-a-post.html
monthly: tolstoy.com/blog/archives-march-2005.html
category: tolstoy.com/blog/category-bloggage.html
(As implied by the next requirement, I very much don't want to use mod_rewrite to achieve the foregoing.)

2. I want as little dynamically-generated content as possible. WP apparently uses index.php to serve all content dynamically. mod_rewrite is used to simulate permalinks. MySQL is hit each time a page is loaded. That scheme has two problems: a) it's resource-intensive, and b) it's prone to errors. If MySQL or PHP crashes, there goes your pages. I want index.html to be an actual static HTML file which is served to the user with at most server-side includes. I've found two possible ways to create static pages with WP so far: Staticize (originally from here; at the end of that page there are currently some PHP errors printed out which is what I'd like to avoid) and the more recent WP-Cache 1.0. Both apparently just cache pages when they're first requested, they don't rebuild a la MT. Thus, index.html isn't a standalone page, it's served from the cache. I just want to rebuild and create static pages.

3. When a post is added, I want to output a snippet of HTML containing just links to the latest posts. I'd use server-side includes to include that in the non-blog-related static files at the site.

There are earlier discussions of MT v. WP here and here. There's even more links here.

(I can't use Roller because the server with tolstoy.com doesn't allow servlets. I have another server that allows servlets, but that would be even more complicated than caching. Plus, the roller .jar files are >600kb meaning that figuring out how to make modifications might take some time. Or, I could create a fake blogging system by hand-writing raw HTML but I'd rather avoid that. Or, I could write something like this myself, but then I'd need to add in comments. Then, I'd need to add trackback, XMLRPC, etc. etc. Then...)

UPDATE: I downloaded WP and, since it consists of several 100s of kb of PHP files, I don't think I'll be wading into that any time soon. However, a plugin looks easier to write. It looks like I might be able to create a plugin similar to the caching ones that would save WP's output at a series of static files like I want:

1. Create one or more db tables that would map whatever internal ID WP uses to differentiate posts to a file name:

create table filename_map_table( WPs_ID_number int, filename varchar(255) )

I might need different tables for categories and dates depending on how WP's IDs are set up.

2. When a post is created, the plugin would be called and would execute:

insert into filename_map_table( [post ID], dirify( [post title] ) );

I'd have to figure out how to get the post's ID and title from WP.

3. Whenever something happens (post created, comment added, trackback received, etc.) rebuild the affected files.

I'd imagine I'd be able to get the post ID of the affected post from WP. Then, I'd figure out what categories and date-based files that's in, and rebuild all those files.

4. Rebuilding a file would be similar to what's done by the caching plugins. I'd save to a buffer the output of index.php when hit with the post/category/date-based identifier. Then, I'd save that to the filename obtained from the filename_map_table tables.

5. index.php would still exist and the blog could be accessed that way, but I'd discourage that by renaming it to hidden-index.php or similar.

If there's something like that already out there, please leave a note.

Comments

I'm going to have to agree with my contemporaries. WP is designed to be dynamic from the bottom on up and rewriting it to be static would be a major undertaking.

The existence of the cache plugins simply means that folks recognize that dynamically generating the same thing over and over again is computationally expensive. No one can argue against that. MT generates everything upfront and takes its sweet time to do it while a version of WP with cache will build a file the first time its shown and keep it until its shown again. The build time is spread out over time and you can still move quickly with design changes, multiple themes, etc.

I'm not sure what you have against mod-rewrite but that's definitely the way to achieve what you want and I also don't know much about how often php and mysql crash. I've never seen it happen but then I pay professionals to handle such things.

I say join the WP party because we're that much cooler.

I don't know that WP can be made to go all static, nor am I sure why anyone would want to do that. But if you do, the best bet is probably the last free version of MT.

The fact that there are two plugins designed to cache WP's output indicates that there's interest in doing something like this. Take a look at the benchmarks for WP-Cache. He served 6 Megs of static HTML in the same time it took WP to serve 114k.

I've posted two messages to WP's support forum asking about this. The first message got three replies all suggesting if I wanted something like MT I should just use MT. The second message got no replies.

Thus, this is a bit of a challenge...

So, I might modify one of those caching plugins to save to a permanent file instead of a cache (nixing their use of a per-user cache copy), or I could write a plugin that would communicate with an external app via a file or socket. The plugin would tell the external app when something had happened to change a post: it had been published, or a comment or trackback had been left, etc. That external app would queue up that event, wait for a few minutes, then use WP's db to figure out which pages were affected. Then, it would hit index.php just like a user would for the affected files (index, post page, category page, etc.) and save those to permanent files.

No one likes MT's rebuild times, but, for instance, very few of the posts I've made in the past have ever changed after being posted. Some of them might have had comments added, but that's a rarity. It makes no sense to serve those files dynamically when static is much better.

Honestly, you're trying to take WordPress and take away everything that differentiates it from Movable Type. The amount of work it would take to essentially de-evolve WordPress is going to likely be more than the $200 it would take to buy Movable Type.

You would need a plugin to generate a file using a template of some sort (using Smarty, or some other templating engine) but you would also need a mechanism to regenerate every page for when you changed your template.

WordPress wasn't designed with this in mind, but Movable Type was.