An easy way to import a Mephisto blog into WordPress is by using a
Python script for extracting a WordPress-friendly WXR file from Mephisto (which can be imported via the WordPress web admin interface), which eventually worked like a charm. I had to modify it to use MySQL, and to look at a different date field for publication (my Mephisto install was returning Null in the field m2wp.py was looking at).
- Go grab m2wp.py.
- Download m2wp-mysql.diff. (Update 6/6/08: fixed the missing trailing newline)
- Run
patch m2wp.py m2wp-mysql.py.diff -o m2wp-mysql.py
.
- Now you can run
python m2wp.py -h
and you’re off and running!
A less effective method is to transform Mephisto’s Atom feed into RSS, and import that into WordPress. This is a pain, because the feed does not contain comments, but here is how I did it before I discovered
m2wp.py
:
- Get the XMLStarlet command line XML toolkit.
wget http://atom.geekhood.net/atom2rss.xsl
wget http://mymephistoblog.com/feed/atom.xml
xml tr atom2rss.xsl atom.xml > rss.xml
- Go to http://mywordpressblog.com/wp-admin/admin.php?import=rss
- Import your rss.xml
- Pull comments over by hand.