Categories

« Badda bing, badda ... | Main | RACMOD »

Migrating from Wordpress to Movable Type (Part 2)

Having established I would move from WordPress to MovableType, I needed a way to preserve the blog entries and comments during the preceding three months. Thankfully, MikeT has an article on the process he used. I thought I would elaborate slightly on his instructions.

For the sake of brevity, I will refer to $W as the location of the top-level wordpress directory. For my machine, this was /home/jim/www/w $M refers to the MovableType installation directory.
  1. Back up your database. If you're on a linux machine using MySQL, the command will be something like this:
    mysqldump -uwordpress -ptoomanypatches -hmysql.localhost.com myblog > mybackup.sql
    where:
    • wordpress is the user name used by your database
    • toomanypatches is your database password
    • mysql.localhost.com is the machine hosting your database
    • myblog is the actual database created
    You can find this information in lines two through six of your $W/wp-config.php file
  2. Place this script on your website in $W/wp-byebye.php. You'll run this from your web browser, e.g.:
    http://www.localhost.com/wp-byebye.php
  3. Save its output into a text file. From your favorite internet browser File -> Save as -> byewp.txt of type text.

    It's sad, but this is MovableType's delimited format for saving and restoring blogs.
  4. Install Movable Type. Here are the basics. I dug around, setting up the individual archive to map entries to the same directory structure Wordpress used: /yyyy/mm/some_swarmy_title/.

    In Wordpress, the URL is rewritten to automatically generate on the fly. MovableType pre-creates this. However, by mapping it to a directory, as above, any extension is hidden from the end user.
  5. Copy the byewp.txt to your MovableType installation under $M/import/ The file name does not matter. If your blog is small enough, you can also upload this via browser.
  6. In MovableType, select the Import option.
  7. If it errors out, don't panic. You can reset the MovableType's database without messing up any of the core configuration:
    delete from mt_entry;
    delete from mt_comment;
    delete from mt_category;
    delete from mt_placement;
    delete from mt_trackback;

    alter table mt_entry auto_increment = 0;
    alter table mt_comment auto_increment = 0;
    alter table mt_category auto_increment = 0;
    alter table mt_placement auto_increment = 0;
    alter table mt_trackback auto_increment = 0;
    The biggest problem I had was with trackbacks, aka "link spammer magnets." Apparently there were several that had been posted to the database using incorrect syntax. (So not only do we have annoying link spammers, we have stupid, annoying link spammers.) The simplest solution for this is to delete all of the trackbacks. I commented out the last section ("pings") from Mike's script and redid the export sans spambacks.
  8. Configure templates! Mike offers a lot of detail on ways of going about this. Definitely download Akismet and Blogroll, and Mark Carey's excellent plugins Ajax Rating, Fast Search (because MT's is so dog slow) and Trusted Commenters. You may also find Arvind's Style Generator very helpful in selecting a motif that you like.
  9. Edit .htaccess - I left the Wordpress blog online for a week while I sorted through all of the files not found and such. The slugs and basenames used by Wordpress and MovableType, respectively, mostly matched, but there were still about 5% that did not. For these, I ran a couple of SQL queries:
    SELECT `entry_basename`, post_name
    FROM `mt_entry`, wp_posts
    WHERE post_date = entry_created_on and post_name <> entry_basename
    From this, I generated a series of entries in .htaccess that looked like this: Redirect permanent /2003/05/the_i90_floatin/ http://www.jimcarson.com/2003/05/the-i-90-floating-bridge/

Seattle Area Weather

Partly Cloudy: 53° F, wind 340°@ 3 mph, visibility 10 mi, 46% humidity

Recent Comments

jim on Hello Kitty bag: My wardrobe is specially designed to emit a stealth field le

susan dennis on Hello Kitty bag: PLEASE tell me you have a matching outfit. Or at least a sn

jim on 22 seconds longer: John: I might be up for a New Year's Eve ride, ideally short

Stacy on 22 seconds longer: I'd like my mocha back, please. hee. Congratulations, Jim.

John on 22 seconds longer: Gee, I was hopin' you would need to join me for the new year

Tag cloud

December 2007

Sun Mon Tue Wed Thu Fri Sat
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
[ the archives (1.0) ]
Creative Commons License
This weblog is licensed under a Creative Commons License.

Technorati

Technorati search

» Blogs that link here


Got a comment? Is something broken? Email me at .
I appreciate and read every email, but I'm so deluged, that I can no longer respond personally. Please don't be offended.


deformity-laggardly