Categories
Computers Linux

Migrating from Drupal 4.7.3 to WordPress 2.3.2

I used to run this blog on Drupal 4.7.3 and really hadn’t upgraded the software in more than a year. For some reason, the whole blog felt very slow and it took ages to get into the administration pages. It was clearly time for change. The question was whether I should upgrade to Drupal 5 or switch platform altogether. To be honest, I really didn’t actually use any of the more CMS-ish features of Drupal and I have a couple of other sites on WordPress so I thought long and hard about switching to WordPress.

But what about all the previous content? Sure, I hadn’t written that much but there was a little and it is always nice not having to start from scratch. Unfortunately there didn’t seem to be any recommended solution for migrating the content. Some other bloggers had posted MySQL scripts that could take the data from one format to another but it was supposedly very uncertain if it was going to work with my combination of versions. Now, I have no problem whatsoever in writing SQL scripts and do so ever so often in my job – I just felt that there had to be a simpler way. And there was.

It turns out that WordPress has a very nice RSS import feature and I had set up Drupal to provide an RSS feed. I just switched on the setting in Drupal that makes the RSS feed include all the text and not just the teaser but then I had one small issue – Drupal doesn’t let you show more than 30 posts in the RSS feed.

It was time to get dirty and jump into the PHP code. 43% down in the file /modules/system.module there is an array with the number of posts to show. Just stick “, 9999” (or some other large number) at the end of the list and go back to the setting page in Drupal and pick it. Then just save the RSS feed and import it into WordPress. Ta da!

 

One reply on “Migrating from Drupal 4.7.3 to WordPress 2.3.2”

Ah, now I understand why my Google Reader hasn’t shown updated posts from you the latest months… Maybe one thing to add is – don’t forget to publish a last post on your old blog with the information that there will be technical changes and that the RSS might change address!

Focusing on how to do things technically perfect often makes you forgets those small non-technical details…

Comments are closed.

css.php