A couple of thoughts on converting from Wordpress to Octopress

I have been toying for awhile with the idea of moving my family’s blog from Wordpress over to Octopress. I wasn’t looking forward to re-entering all those blog entries. However, I finally was ready to make the move for two reasons.

First, Wordpress is slow. To be fair, it’s probably not entirely the fault of Wordpress. I am sure there are things I can do in my configuration to speed things up. I have already replaced apache with nginx and enabled caching. In the end it’s still too slow for me.

The second reason that I wanted to move it is because I am a technology junkie and I like playing with new things. Octopress is that new thing for me. The blog you are reading now was created with Octopress and I like the ease of embedding images and videos, among other things that make markdown nice. I host all my images and videos on Rackspace Cloud Files and it’s just as simple as using the “%img” tag with a link to the CDN enabled file to place a picture in a post.

I won’t turn this into a how-to on making the change, but I will point out a couple of things. I used a Wordpress plugin called WordPress to Jekyll Exporter to convert all my posts to Markdown that can be used by Jekyll. Octopress is a front end for Jekyll. The plugin worked well with the text portion of the conversion but left me with some work to do, which I expected. Since my images were all stored on the Wordpress server, I am having to upload them to the CDN and then change the location of the images in each post. It’s still worth it to me to convert.

The other thing that threw me was that I kept running into PHP memory limit errors when trying to run the exporter. I’ve been a linux sys admin for a number of years and I know exactly how to fix that problem. But the fix didn’t work! I am running php_cgi with nginx and I thought that there was an issue with the configuration of php_cgi. I searched high and low and frustratingly didn’t find anything wrong with my php_cgi OR nginx configurations. What it turned out to be was this nicely hidden configuration option in Wordpress:

define( 'WP_MAX_MEMORY_LIMIT', '256M' );

This is located in {wordpress root}/wp-includes/default-constants.php. After changing that value to 512M and making sure that /etc/php.ini had the same or higher memory limit set, I was able to export my Wordpress blog entries into a nice .zip file and then get to work putting them into Octopress.