This project is not covered by Drupal’s security advisory policy.
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;
- Import the WordPress post's content body to a CCK text field
- Import the WordPress post's content teaser and body (excluding the teaser) to two different CCK text fields
- Import WordPress author name as a user-reference, node-reference and/or CCK text field
- Import WordPress categories or tags as a node-reference and/or CCK text field
- Import WordPress categories and/or tags into the same vocabulary
- Only import categories and/or tags that are used in the posts (instead of all tags)
- Do not import categories and/or tags at all
- Import enclosures (podcasts) as a FileField.
- Import attachments as a FileField on the WordPress post's node
- 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)
- 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;
- Download and install the
wp_feeds
(WordPress XML for Feeds) package -
Download and install dependencies:
- CCK (
cck
) - Features (
features
) - Feeds (
feeds
) - FileField (
filefields
) - Path Redirect (
path_redirect
) - Strongarm (
strongarm
) - The
wp_feeds
module requires the SimplePie library. Installsimplepie.inc
tosites/*/modules/feeds/libraries/simplepie/simplepie.inc
. If you prefer to use the Libraries (libraries
) module (recommended), you can install it insites/*/libraries/simplepie/simplepie.inc
. - The
feeds
module may need to be enabled before thewp_feeds
module, becausewp_feeds
can not detect the presence of SimplePie tillfeeds
has fully initialised, or something like that.
- CCK (
-
Download and install or apply optional but recommended modules and patches:
- 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 onadmin/settings/filters
. - Developer (
devel
) - Apply patch from #724536: Mapper for nodereference field in Drupal 6 to Feeds module
- Global Redirect (
globalredirect
) removes the trailing slash ("/
") from WordPress paths when users hit your new Drupal site. Some search engines considerexample.com/my/path/
andexample.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.
- Caption Filter (
- Enable the
feeds
module - Enable the
wp_feeds_wxr_importer
module - Note the vocabularies, fields and content types that it has created
- Go to
import/wordpress_xml
and upload the WXR file - Review the imported content
-
At this point it is likely desirable to change the mapping of what data gets imported to where in Drupal:
- Enable the Feeds UI (
feeds_ui
) module - Go to
admin/build/feeds/edit/wordpress_xml/mapping
and click your life away - 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.
- Enable the Feeds UI (
-
At some point it may be desirable to export this mapping configuration to code. (I have not fully tested these steps yet):
- Go to
admin/build/features/wp_feeds_wxr_importer/recreate
- Check all the content types, fields and other configurations are managed
- Download the features-package
- Install the features-package to
sites/default/modules/wp_feeds_wxr_importer/
; This will override any module of the same name insites/all/modules/
ormodules/
- Go to
-
Alternatively:
- Disable the
wp_feeds_wxr_importer
module - Create your own Feeds Importer (using the Feeds UI) and other configurations
- Create your own Features package using the Features UI
- Disable the
- 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
- Seeking co-maintainer(s)
Maintainers are looking for help reviewing issues. - Maintenance fixes only
Considered feature-complete by its maintainers. - Module categories: Import and Export, Integrations
- Created by Bevan on , updated
- This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.