wp_feeds.jpg

About

The WordPress XML for Feeds module exposes WordPress-specific data in WXR files (that's "WordPress eXtended RSS") to the Feeds module. It also includes the WordPress Importer module (a features-package), which imports WXR files using Feeds and the WordPress XML parser.

The purpose of the WordPress XML for Feeds (wp_feeds) and WordPress Importer (wp_feeds_wxr_importer) modules is to offer a comparable feature-set to the WordPress Import (wordpress_import) module (not to be confused with WordPress Importer (wp_feeds_wxr_importer) module), but in a way that is far more flexible, and that integrates with Feeds, CCK, FileField and other popular Drupal APIs so that data can be manipulated to fit arbitrary data models.

See also WordPress Migrate module, which I have not tried out. A comparison would be nice.

Features

Here are some things you can do with WordPress XML for Feeds that you can not do with WordPress Import. Please offer corrections in the issue queue if I am mistaken;

  1. Import the WordPress post's content body to a CCK text field
  2. Import the WordPress post's content teaser and body (excluding the teaser) to two different CCK text fields
  3. Import WordPress author name as a user-reference, node-reference and/or CCK text field
  4. Import WordPress categories or tags as a node-reference and/or CCK text field
  5. Import WordPress categories and/or tags into the same vocabulary
  6. Only import categories and/or tags that are used in the posts (instead of all tags)
  7. Do not import categories and/or tags at all
  8. Import enclosures (podcasts) as a FileField.
  9. Import attachments as a FileField on the WordPress post's node
  10. Import attachments as their own nodes, different to the WordPress post's node (not tested, but almost complete; Node reference to WordPress post is not implemented yet)
  11. Import comment hierarchy

(Note that setting user references and node references with Feeds requires #724536: Mapper for nodereference field in Drupal 6.)

Usage Guide

(Note that WordPress Importer does not import WXR files as completely or accurately if either the WordPress site or Drupal site run in a subdirectory of the domain or web document root.)

How to use WordPress Importer for a typical import of a WordPress WXR file;

  1. Download and install the wp_feeds (WordPress XML for Feeds) package
  2. Download and install dependencies:
    1. CCK (cck)
    2. Features (features)
    3. Feeds (feeds)
    4. FileField (filefields)
    5. Path Redirect (path_redirect)
    6. Strongarm (strongarm)
    7. The wp_feeds module requires the SimplePie library. Install simplepie.inc to sites/*/modules/feeds/libraries/simplepie/simplepie.inc. If you prefer to use the Libraries (libraries) module (recommended), you can install it in sites/*/libraries/simplepie/simplepie.inc.
    8. The feeds module may need to be enabled before the wp_feeds module, because wp_feeds can not detect the presence of SimplePie till feeds has fully initialised, or something like that.
  3. Download and install or apply optional but recommended modules and patches:
    1. Caption Filter (caption_filter), with patch from #934844: Support WordPress [caption] syntax (implement full quicktags.inc file). Add it the "Caption Filter" to the appropriate input formats on admin/settings/filters.
    2. Developer (devel)
    3. Apply patch from #724536: Mapper for nodereference field in Drupal 6 to Feeds module
    4. Global Redirect (globalredirect) removes the trailing slash ("/") from WordPress paths when users hit your new Drupal site. Some search engines consider example.com/my/path/ and example.com/my/path to be unique content items and can mark them down as "duplicate content". This feature of global redirect solves that issue. On the other hand, the redirect might cause a temporary hit to your search engine results score (e.g. PageRank) while the search engine transfers it's score to the new URL.
  4. Enable the feeds module
  5. Enable the wp_feeds_wxr_importer module
  6. Note the vocabularies, fields and content types that it has created
  7. Go to import/wordpress_xml and upload the WXR file
  8. Review the imported content
  9. At this point it is likely desirable to change the mapping of what data gets imported to where in Drupal:
    1. Enable the Feeds UI (feeds_ui) module
    2. Go to admin/build/feeds/edit/wordpress_xml/mapping and click your life away
    3. Note that targets that are FileFields work best if they are after any text field targets (including Node body). Otherwise, not all of the files' paths & URLs will be substituted.
  10. At some point it may be desirable to export this mapping configuration to code. (I have not fully tested these steps yet):
    1. Go to admin/build/features/wp_feeds_wxr_importer/recreate
    2. Check all the content types, fields and other configurations are managed
    3. Download the features-package
    4. Install the features-package to sites/default/modules/wp_feeds_wxr_importer/; This will override any module of the same name in sites/all/modules/ or modules/
  11. Alternatively:
    1. Disable the wp_feeds_wxr_importer module
    2. Create your own Feeds Importer (using the Feeds UI) and other configurations
    3. Create your own Features package using the Features UI
  12. Be done!

Commercial support

The author of this module is available for hire. Contact Bevan.

Attribution

This module was originally developed by Palantir.net.

Project Information

Downloads