Migrating to Drupal

Last modified: June 24, 2009 - 08:54

This page contains hints and scripts from members of the Drupal community for migrating to Drupal from other content management systems (CMS) weblog, and bulletin board applications. Migrating from other platforms often requires knowledge of PHP and SQL.

Migration involves mapping data fields from the original application's database into Drupal's database. For some applications this can a simple task, with tools or scripts available to do the migration. Other applications may have complex database schemas, lack documentation, and are uncommon enough that there are no tools available.

The best way to find out if tools or scripts exist for your application is to search on Google. For example a search such as "migrate WordPress Drupal" returns dozens of useful links.

If there are no tools available for migrating from your application to Drupal, you will want to familiarize yourself with Drupal's database schema, as well as the schema of the application you are migrating.

You will need to map all your current users into Drupal's users table. If you have different roles (for example, read-only, author, editor/reviewer, admin), you will need to assign your users to properly set up and configured roles in Drupal. This can mostly be done through Drupal's admin interface, although if you have a large number of users, you may want to find a way to automate the assignment. Editing each user by hand could be time consuming.

If the content being migrated is text, it would likely map into the node and node_revisions tables, with comments in the comments table.

It is usually possible to import databases (MySQL, etc.) containing content and users from your previous CMS into Drupal.

This can be done by exporting the databases first to CSV (comma-separated values) or similar files. Tools such as phpMyAdmin for MySQL can make this task easier. You can then import these files with import/export modules such as Node Import, User Import, or CSV Parser. Note that content is often imported as Content Construction Kit (CCK) custom content types. If your tables are available in your Drupal database, you can use the Table Wizard to expose them to Views, and then use the Migrate module to copy the data from the old columns to the CCK content types.

In the case that your chosen import module is not yet ready for the Drupal version you wish to use, then there is the workaround of installing a site running on a previous Drupal version just for the import, and then upgrading it.

On the other hand, if you prefer to migrate data into Drupal developing a custom PHP script, see for example Migration tips for some techniques.

Support for migrating can be found on the Drupal.org forum, Converting to Drupal.

Finally, look in the Drupal CVS contributions repository for a subdirectories named mt2drupal (code for migrating from Movable Type to Drupal), phpbb2drupal (SQL code for migrating from phpBB to Drupal) and slash2drupal (Slash 2.2 to Drupal) for SOME IDEAS. None of these is up to date with the latest releases of Drupal and the respective source systems, so they will NOT work with latest versions of any of the foregoing. However, they will get you close.

The following pages describe methods people have used to migrate to Drupal in the past. As other CMS software and Drupal evolve, you can use these as a guide to help with your own.

 
 

Drupal is a registered trademark of Dries Buytaert.