Few weeks ago I decided it was time to change the look and feel of Santako.com and also take the opportunity to start using a content management system that simplifies the administration. It didn’t take us very long to chose WordPress due to its versatility, high quantity of plugins available and the little maintenance required.
One of the first challenges has been to migrate the users and articles from the current version, which uses Drupal. I haven’t found any plugin that executes the migration automatically so I decided to export the data in CSV tolater import it in WordPress. The steps I’m explaining bellow were executed with Drupal 7 and WordPress 3.6. In my case, I just needed to import some basic elements from the posts, so many fields such as the author, dates and tags were not migrated.
Users
- Access the Drupal installation database from phpMyadmin.
- Select the ‘users’ table.
- Click on ‘Export’ and select ‘CSV’ as file format.
- Once the file is generated, edit it and add the following headers in the first line, linking these to the columns (you can delete the rest of columns):
- user_login
- user_pass
- user_email
- Install this plugin in WordPress and enable it: http://wordpress.org/plugins/import-users-from-csv/
- Access the ‘Users’ menu and select ‘Import from CSV’.
- Click on ‘Import’.
Posts
- Access the Drupal installation database from phpMyadmin.
- Click on the ‘SQL’ tab.
- Paste the following query and click on Go’:
SELECT * FROM node INNER JOIN field_revision_body ON node.nid=field_revision_body.entity_id;
- Install this plugin in WordPress and enable it: http://wordpress.org/plugins/wp-all-import/
- Access the plugin from the administration sidebar.
- Select ‘Upload File From Your Computer’ and click on ‘Next’.
- In the following steps you will be asked to drag and drop the imported data to the fielsd they belong to and confirm some default options.
Once the import is complete, I recommend using the plugin Broken Link Checker to make sure everything worked properly and there are no broken links.