If you have custom content types that you want to migrate from a Drupal 7 installation to a WordPress installation, you will need to have a few things in place to make it happen.
-
Modify the default XML output templates to look and smell like a WordPress export.
-
Mapping Categories If you have unique categories and you want them to match up with taxonomy that you have created on your new site, you will need intercept the categories that are presently applied and overwrite them.
-
Create the needed Drupal views After installing the Views Data Export module, you need to navigate to your Views panel and create a view of the content in fields that you would like to export. From this view you create an Export View of that view. The export views don't have consistent editing abilities. So, in the pre-view (haha the jokes) experiement with the output to get the fields that you will need all organzed. Make sure you name your view and your data export views uniquely to make the commands easier to run and remember.
Eg. View name - Page Content Export page_content_export Posts Content Export post_content_export etc..
- Edit your view theme files The default XML template files can be found in the module contrib folder as you would expect in a Drupal project. Make some copies of the files and add them to your template so that your changes are unique to your theme. And because it is the right thing to do..
views-data-export-xml-body.tpl.php
-- this is where you can write all your special wrapper outputs to reformat content, taxonomy terms, etc. The bulk of the unique changes will be handled in this file.
views-data-export-xml-footer.tpl.php
-- closing wrapper of the output
views-data-export-xml-header.tpl.php
-- add the unique wordpress header information that is required to be recognized a WXL style file.
drush views-data-export [view-name] [display-id] [output-file.xml]
Example
drush views-data-export view_my_view_name data_export_all_items all_of_posts.xml
Importing a backup from Pantheon ala Drush
gunzip < yourdbname.sql.gz | drush sqlc
Create a starting point backup that has your config and no posts in the DB.
wp db export
Then reset your DB so that you can test your progress
wp db reset
Import from the reset point that you created
wp db import yourdbexportname.sql