Migrate a WordPress site to Drupal
Recently I've been helping a few folks convert websites from WordPress to Drupal. Presently this works for migrating to Drupal 5 so if you want a Drupal 6 site first migrate to Drupal 5 and then upgrade the site to Drupal 6.
There are a couple of different ways of approaching this task. In the distant past I've worked with wp2drupal. Those experiences are a distant enough memory that I can't speak to it one way or another. It does seem that it has been a while since that module was upgraded. On the other hand Wordpress Import is undergoing active development. One user I worked with in IRC was struggling with wp2drupal and found Wordpress Import to be very simple. Also a note that the Wordpress Import module has been updated since I've used it so some of the steps may not be necessary.
The process really couldn't be simpler. Start with an WordPress export of an extendedRSS file. With this in hand you'll need a Drupal site setup. The site can either be new or an existing site but these hints apply to using a new site. The import process is very simple you select the extendedRSS file and tell Drupal which WordPress users map to which Drupal users. With that done the data now resides in the Drupal database. Things are pretty good but there are a few tweaks that make things better. The creation time for the items has been set to the creation time from WordPress. However, the updated time is set to the time of the import. This really matters most if you have search enabled on your site. Search results show the time changed in the display.
Setting the updated time to the created time is a simple SQL query. Note that these examples are for MySQL.
UPDATE node n set n.changed=n.created;
This sets the changed time to the created time.
In one case the Blog module wasn't enabled during the import so all of the WordPress blog stories came in as stories. This too is easy to change:
UPDATE node set type="blog" WHERE type="story";
One other little change cleans things up considerably. When Wordpress Import does its magic it imports tags that contain hyphens instead of spaces. This too can be easily remedied with a SQL query. Note, however, that doing this will also remove hyphens from any tags that are supposed to have hyphens.
UPDATE term_data set name = replace(term_data, "-", " ");
Note that if this is an existing database with some small amount of work it is possible to add WHERE clauses to these statements in order to limit the effects to the newly imported WordPress data.