This repository contains the new version of the WordPress Importer currently in development. Learn more about the rewrite.
Fast, lightweight, consistent. Pick three. 🌴 😎
This fork of WordPress Importer Redux contains many modifications, chief of them are:
- It is able to import WXR 1.3-proposed instances, while still being able to import WXR 1.0, 1.1 and 1.2 instances by seemlessly tranforming them into WXR 1.3-proposed instances
- Correctly imports WXR instances (of any version) in an XML Namespaces aware manner. See wordpress-importer's lack of understanding of XML Namespaces causing compatibility issues
- Includes the following PRs which have not yet been merged in the main repo:
- Correctly imports terms that are mentioned in
item/category
but for which there is nowxr:term
. This can happen with exports generated by the standard exporter for terms in thepost_format
taxonomy. - Contains VERY provisional hooks to allow plugins to import extension markup in WXR 1.3-proposed instances.
- As of version 2.0.2, provisional hooks have been added for extension markup at
the
/rss/channel/item
level.
- As of version 2.0.2, provisional hooks have been added for extension markup at
the
- There are unit tests
- I is able to run along side WordPress Importer, which is helpful (to me, at least) in evaluating its performance in relation to WordPress Importer.
Most of the changes are not yet ready to merge into WordPress Importer Redux, but I am coordinating with Ryan McCue and when they are ready we will merge.
Note: You can install WordPress Exporter Redux, which is a rewrite of the standard WordPress Exporter, that among other things, is able to export native WXR 1.3-proposed instances.
Want to experiment with the import hooks mentions above?
- A semi-realistic "demo" plugin exists that demonstrates exporting and importing custom tables. That plugin is available at P2P Export/Import.
- Install the plugin directly from GitHub. (Download as a ZIP)
- Activate the plugin (make sure you also deactivate the original Wordpress Importer if you have it installed).
- Head to Tools → Import
- Select "WordPress (v2)"
- Follow the on-screen instructions.
The plugin also includes CLI commands out of the box.
Simply activate the plugin, then run:
wp wxr-importer import import-file.xml
Run wp help wxr-importer import
to discover what you can do via the CLI.
The current major items are currently missing or suboptimal in the Importer:
- UI to inform user performing the import that the WXR instance contains extension markup produced by plugins and to give them the opportunity to install/activate those plugins before starting the import
- Hooks to allow plugins to process/import extension markup in the WXR instance
- As of version 2.0.2, provisional hooks have been added for extension markup at
the
/rss/channel/item
level.
- As of version 2.0.2, provisional hooks have been added for extension markup at
the
The best way to help with the importer right now is to try importing and see what breaks. Compare the old importer to the new one, and find any inconsistent behaviour.
We have a general feedback thread so you can let us know how it goes. If the importer works perfectly, let us know. If something doesn't import the way you think it should, you can file a new issue, or leave a comment to check whether it's intentional first. :)
The WordPress Importer is licensed under the GPLv2 or later.
Original plugin created by Ryan Boren, Jon Cave (@joncave), Andrew Nacin (@nacin), and Peter Westwood (@westi). Redux project by Ryan McCue, Paul Biron and contributors.