Skip to content

pbiron/wordpress-importer-v2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WordPress Importer Redux

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:

  1. 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
  2. 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
  3. Includes the following PRs which have not yet been merged in the main repo:
    1. Improved hierarchical term handling
    2. Fix bug whereby non-xml files in the media library are shown when "Select it from the Media Library" is clicked
    3. Fix bug on mime-type of uploaded files
  4. Correctly imports terms that are mentioned in item/category but for which there is no wxr:term. This can happen with exports generated by the standard exporter for terms in the post_format taxonomy.
  5. Contains VERY provisional hooks to allow plugins to import extension markup in WXR 1.3-proposed instances.
    1. As of version 2.0.2, provisional hooks have been added for extension markup at the /rss/channel/item level.
  6. There are unit tests
  7. 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.

Companion Plugins

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.

How do I use it?

Via the Dashboard

  1. Install the plugin directly from GitHub. (Download as a ZIP)
  2. Activate the plugin (make sure you also deactivate the original Wordpress Importer if you have it installed).
  3. Head to Tools → Import
  4. Select "WordPress (v2)"
  5. Follow the on-screen instructions.

Via the CLI

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.

Current Status

The current major items are currently missing or suboptimal in the Importer:

  1. 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
  2. Hooks to allow plugins to process/import extension markup in the WXR instance
    1. As of version 2.0.2, provisional hooks have been added for extension markup at the /rss/channel/item level.

How can I help?

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. :)

License

The WordPress Importer is licensed under the GPLv2 or later.

Credits

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.

About

In-development rewrite of the WordPress (WXR) Importer

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 73.0%
  • PHP 25.7%
  • Other 1.3%