As I mentioned in my earlier post, the comment spam came in right away after installed WordPress. Now, that’s not to say it was WordPress’ fault. I guess I just didn’t notice them before with Movable Type. Anyway, I simply installed the Disqus plugin. Do understand that I’m not endorsing Disqus; I installed it, and it works.


Today I migrated the site off of MovableType and onto WordPress. I had been wanting to do this for quite some time. The hurdle I had to overcome was porting the data from MovableType in such a way that permalinks wouldn’t 404. The first import utility I tried didn’t maintain the entry IDs stored in MovableType. At that point, it wasn’t important enough and I left it alone. I came back to it today, months later, when I went looking for a MovableType theme based on Twitter Bootstrap. When I didn’t find what I was looking for in MT, I found it in WP. Now I had to find a way to get the data across.

Movable Type Backup Importer

I found this plugin in the WP plugins directory. First thing is it used the actual XML backup file created by MT when you select backup and not just export. I had to fix a few ilegal characters that were in spam trackbacks before the plugin would import the data because the XML was invalid. I used a combination of Sublime Text 2 and Firefox (yes, I’m a Chrome user but Firefox does a more explicit job of pointing out errors in an XML doc) to clean up the XML. As for spam, I didn’t bother cleaning it up. I’m confident that the comments on the blog are mostly clean, and I don’t think trackbacks are were all that important.

Once I imported the data, the same issue persisted from the first time I attempted a data import; the IDs were reset on import. So, first thing is I touched base with the author of the plugin, rogerdudler. I then went off on my own to see if there was a way to allow this to work. As it turns out, there is. On line 2582 of wp-includes/post.php, the code comment was clear:

// If there is a suggested ID, use it if not already present

Armed with this new found knowledge, I went back to Roger’s plugin, and added

$post->import_id = $id;

after line 407. That was it. I used another plugin, WordPress Reset, to flush the database. The second import worked like a charm. The WordPress Post IDs matched the MT entry IDs. Almost done. WordPress is dynamic, and MovableType is static. Now, .htaccess and mod_rewrite to the rescue, and a setting change in WordPress, which I’ll get to in a second. Here is the .htaccess file

RewriteEngine on
RewriteRule ^archives/0*(\d+).html$ /archives/$1 [R=301,NC,L]
RewriteRule index.rdf /index.php?feed=rdf
RewriteRule index.rss /index.php?feed=rss
RewriteRule index.xml /index.php?feed=rss2
RewriteRule atom.xml /index.php?feed=atom

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress 

The first part is what I added, the latter being programmatically generated by WordPress. The setting change came in Settings>Permalinks. I changed the setting to Numeric in order for the links to be similar to MT, and I prefer a flat, static looking permalink. It seems more SEO friendly. After that setting change, everything appears to be working correctly. For example, if you Google “Avistar Sucks” the link is the old MT style until Google updates my permalinks. Clicking on it redirects you to the WP entry. By the way, did you notice the use of R=301 in the rewrite rule? By default, mod_rewrite would issue a 302, which is a temporary redirect. Search engines do not care for 302s. They want to see a 301, which is a permanent redirect. I learned about the 302/301 issue here. Let’s just hope I don’t mess up years of search rankings.

Markdown on Save Improved

While in the process of writing a spec for an app I’m developing at work to interface between SedonaOffice and eOriginal, I grew an affinity for using Markdown syntax. I use Scrivener to collect my thoughts, and then I can export to MultiMarkdown (a superset of Markdown). The ease of use is a huge effort saver. With that, I went looking for a Markdown plugin for MT, and I wasn’t happy with what I found. What I did find for WP was Markdown on Save Improved. It works well. As I understand, this plugin stores the Markdown and the HTML in separate columns so the Markdown->HTML occurs when the post is saved, and not for each request. Much faster that way.

The Bootstrap

My search for a Twitter Bootstrap theme let me to this one. It installed in a flash, and is using the reactive stylesheets. One quick install and my blog is all good for desktop, mobile, and tablet.


Just as an aside, since I went live about 30 minutes ago, I already have spam comments to moderate. Oh boy.

On February 28th, 2004, we became the proud parents of a bouncing baby boy. He was born after a relatively short labor, and it only took four pushes to get him out. Despite the fact that he was 3 weeks early, he weighed in at 7 lbs. 10 ozs., and 20.75 inches.

Mother and child are doing just fine. It’s now almost two months later and he is doing great. He’s a much slimmer kid than his sister. In fact, this kid has no tüsh to speak of whatsoever. At his checkup yesterday, his weight is now around the 50th percentile. I don’t recall height, but I belief that he’s around 50 there also.

As for his sister, now that’s another story. She’s right about that age (2) where she’s going to be a handful regardless of now sharing Mom’s attention. Let me put it to you this way, his sister can scream loud enough to set off the glassbreak sensors on the alarm system. Now, that’s some lungs.

Back at Friendly’s again Tonight is the start of a new order. Meg didn’t get peanutbutter cups the other day and wound up with pieces instead. So, she asked for that tonigt. One thing that does is reduce the number of substitutions from 5 to 1. I’m looking forward to a correct order!

I’m at Friendlys and it is quite the trip. For example, the girl who 3 weeks ago couldn’t use the cash register, still can’t. On the bright side, Larry the manager made our sundaes so there’s a far better chance of them being right. Oh, and by the way, why is the price different everytime I come here?

Guess what? I now own a BlackBerry and can blog from the road. This may not mean much, but for someone like me, I can blog from in front of the TV or a boring meeting.
I’m using a MIDLET called MIDlog. It’s written by Daniel Rocha. I appologize for not linking everything, but there’s only so much you can do on a BlackBerry.

Never ever discount the idea of marriage. Sure, someone might tell you that marriage is just a piece of paper. Well, so is money, and what’s more life-affirming than cold, hard cash?

Dennis Miller

Dewey Vozel says:
i hate javascript i think
Dewey Vozel says:
whoever designed the javascript Date object was a doofus
Dave Bitton says:
whomever designed javascript was a doofus
Dave Bitton says:
oh wait
Dave Bitton says:
his name was Mark Andreson
Dewey Vozel says:
is he still alive?
Dave Bitton says:
of course he is
Dewey Vozel says:
let’s fix that