About six months ago, I started becoming unhappy with Nucleus CMS, my blogging platform. First, it had no native support for tagging, which I prefer to categories. To get this functionality, I had to get a plugin, np_tags, and then manually integrate that plugin into my site’s skin. At first, this worked fine, except that you could not view the tag pages (to see all of the posts that had a specific tag). When the update to version 3.31 came out, I applied it and went on with my life. One day while I was looking at my site, I noticed that pretty much everything that did any navigation away from the from page was broken. It took me a whole evening to fix this issue, and I was still left with broken tags.
I finally decided that enough was enough and that I would switch to another blogging platform. My two primary options were Wordpress and Drupal. I knew that both of them could work due to their popularity and wide-spread use. My primary criterion then became ease-of-migration from Nucleus. After a little reading, I discovered that, to move my content into Drupal, I would not only be on my own, but also have to learn Drupal’s API since direct database manipulation is not supported and is known to break things. Since I wanted to do this conversion quickly, I opted to go with Wordpress.
I started out by getting a skin that I liked (Big Blue 0.1 by Bob) and installing some useful plugins. I then did a little tweaking to the plugins to get their widgets to mesh with the skin. Then the real work started.
Getting my data from Nucleus to Wordpress ended up being more difficult that I initially expected. Being a programmer, I have done database work before, so I knew SQL relatively well. I figured I would just need to write a few INSERTs and that would be it. I started by diagramming the relevant parts of each schema and figuring out how I would map one schema into the other. For the posts and comments tables, this was a straightforward transformation, requiring a single INSERT for each, as well as an UPDATE for the posts table. Then came the tags.
In np_tags, the tags for all of the posts are stored in the nucleus_plug_tag table. Instead of doing the sensible thing and putting a tag in each row and allowing a post to be referenced by multiple rows, each post had exactly one row in the table with its tags stored like /tag1/,/tag2/,/tag3/. This was a pain in the butt to break apart using only SQL. I ended up having to write a couple of stored procedures (in MySQL, where I have no experience, instead of T-SQL, where I have had some fun in the past) to break the tags into something manageable in SQL. I finally got all of my data migrated last night, two weeks after I started. (Note, I was not able to work on it last weekend since I went home for my brother’s high school graduation.)
It did not take me long to upload the new data to my blog so that I could look at it in all of it’s glory. I discovered rather quickly that Wordpress was doing some strange stuff to the contents of my posts. Whenever I post videos on the blog, I try to format the HTML so that I don’t have to scroll my text editor horizontally, typically leaving me with markup that looks something like:
<object
width="400"
height="315">
<param
name="video"
value="something">
</param>
<embed
width="400"
height="315"
video="something">
</embed>
</object>
This was then transformed by Wordpress into:
<object<br />
width="400"<br />
height="315">
<param<br />
name="video"<br />
value="something">
</param>
<embed <br />
width="400"<br />
height="315"<br />
video="something">
</embed>
</object>
which of course does not get rendered correctly by any browser. To fix this, I simply had to go and remove the line breaks from within the HTML tags and the problem was solved.
My next thing to fix was to redirect any requests for my RSS feed or the post pages to their new locations. The RSS feed was taken care of rather quickly using Apache’s mod_alias and RedirectPermanent. The posts were harder since I had to use Apache’s mod_rewrite. It took me about 45 minutes of fussing to get a rule that would work. The biggest problem that I ran into using mod_rewrite was how it acts differently between the http.conf file, where I am used to using it, and a .htaccess file, where I had to use it.
Today, I decided to host my feeds through FeedBurner so I can finally get some stats on my RSS feed. To do this, I used the FeedSmith plugin. After I set up my feeds with FeedBurner, I tried to view my RSS feed to make sure that it was being redirected to FeedBurner correctly. Sadly, this was not the case. While my comments feed was being redirected successfully, the same could not be said for my main feed. After trolling through the source for a bit, I gave up and just wrote a mod-alias redirect to redirect requests from the incorrectly functioning http://whistlindixie.us/feed/ URL to the correctly functioning http://whistlindixie.us/feed/rss2.
I also did a little source hacking this morning to tweak the calendar a bit to my liking (take up the full width of the column, attach a class to TDs with links in them) so that I can apply similar styles to it like I did with the calendar in my Nucleus blog. I am also going to work on the tag cloud to get it to display some different tags (right not it only displays the first so-many tags) and to get it to scale the font size properly.
So far, I am liking Wordpress, and I hope that by using Akismet and ReCaptcha that I won’t have to spend lots of time moderating my comments queue like Chris does. Let’s hope things keep going well.