Blogroll

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/
  • Currently 4/5
  • 1
  • 2
  • 3
  • 4
  • 5
Rating: 4/5 (3 votes cast)

← First name's fine; we're very informal here.
← Please leave it blank if you don't have a blog.
← This will not be visible to the public.
Remember this stuff?

Seattle Area Weather

Fair: 50° F, wind 130°@ 6 mph, visibility 7 mi, 93% humidity

Recent Comments

Diane on Equity Accelerator -- feh!: One of the things that is not being considered is that when

woodstock on Movable Type 4 beta 1: I know you had problems with it but so far I've been happy w

John on Century Ride of the Centuries: Part 2 of 2: Your patch goes well with your RAW jersey, Jim. I took a fe

Ted on Ding dong, the trimmer is dead: Thanks for the hints to remove the clutch/flywheel, I was ab

Vern on Internet Usage Survey: As I am disabled the internet has become very entertaining f

Tag cloud

June 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
[ the archives ]

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