wp-cli/wp-cli — pull request #299 by danielbachhuber (2013-02-12 01:34:12+00:00)
Title: Import Command

I started porting over Thorsten's existing cli importer on a flight yesterday. Before I dive too far into it, there are some issues I'd like to address up front.

- The verbosity currently offered by the WP_Import class sucks. We've gotten around this historically by committing our own filters and actions to the importer where we add our own verbosity. One way of "fixing" this would be to fork the code in the importer and rewrite parts of it for CLI. That seems like a bad idea though.
- Because the exporter splits the data into files of 1000 items by default, we have fixer scripts / commands to fix up changed post IDs (e.g. thumbnails and attachment parents) and backfill attachment URLs. The former are dependent (again) on the actions and filters we've committed to the importer plugin. Should I include these fixer scripts too?
- How should author mappings be handled? Our current approach is a PITA. Maybe we can offer an interactive mode and/or CSV support?

I thought I'd pose these questions before I migrate what Thorsten wrote completely so we can change to a new direction if we'd like