Skip to content

Allow to associate extra taxonomies and post meta to each post imported via WXR generated by the Wordpress export feature

Notifications You must be signed in to change notification settings

umbarry/wp-cli-import-plus

Repository files navigation

umbarry/wp-cli-import-plus

Allow extra operations when importing posts via a WXR file generated by the Wordpress export feature.

EXTRA OPERATIONS PERMITTED

  • Associate extra terms and post meta to each post imported.
  • Skip categories and tags import.

Build Status

Quick links: Using | Installing | Contributing | Support

Using

This package implements the following command:

 wp import-plus <file> [--extra-categories=<IDs>] [--extra-tags=<slugs>] [--extra-custom-terms-taxonomy=<taxonomy-name>] [--extra-custom-terms=<IDs/slugs>] [--extra-post-meta-keys=<meta-keys>] [--extra-post-meta-values=<meta-values>] [--skip-categories] [--skip-tags] [--authors=<authors>] [--skip=<data-type>]

OPTIONS

<file>
	Path to one or more valid WXR files for importing. Directories are also accepted.
	
[--extra-categories=<IDs>]
 Comma-separated list of categories IDs to associate to each imported post.
 
[--extra-tags=<slugs>]
 Comma-separated list of post_tag slugs to associate to each imported post.
 
[--extra-custom-terms-taxonomy=<taxonomy-name>]
 The taxonomy of the extra terms to associate to each imported post. 
 If not set the extra-custom-terms parameter will be ignored.
 
[--extra-custom-terms=<IDs/slugs>]
 Comma-separated list of terms to associate to each imported post. 
 If you want to enter terms of a hierarchical taxonomy like
 categories, then use IDs. If you want to add non-hierarchical terms like tags, 
 then use names. The parameter will be ignored if extra-custom-terms-taxonomy isn't set.
 
[--extra-post-meta-keys=<meta-keys>]
 Comma-separated list of post-meta keys to associate to each imported post.
 	
[--extra-post-meta-values=<meta-values>]
 Comma-separated list of post-meta value to associate to each imported post.
 The values will be assigned respectively in the same order to the keys 
 specified in --extra-post-meta-keys.
 
[--skip-categories]
 If set categories will not be imported, except for those set with --extra-categories
	
[--skip-tags]
 If set tags will not be imported, except for those set with --extra-tags

Params --authors and --skip serve for the same scope of the wp import command

Installing

Installing this package requires WP-CLI v1.1.0 or greater. Update to the latest stable release with wp cli update.

Once you've done so, you can install this package with:

wp package install git@github.com:umbarry/wp-cli-import-plus.git

Contributing

We appreciate you taking the initiative to contribute to this project.

Contributing isn’t limited to just code. We encourage you to contribute in the way that best fits your abilities, by writing tutorials, giving a demo at your local meetup, helping other users with their support questions, or revising our documentation.

For a more thorough introduction, check out WP-CLI's guide to contributing. This package follows those policy and guidelines.

Reporting a bug

Think you’ve found a bug? We’d love for you to help us get it fixed.

Before you create a new issue, you should search existing issues to see if there’s an existing resolution to it, or if it’s already been fixed in a newer version.

Once you’ve done a bit of searching and discovered there isn’t an open or fixed issue for your bug, please create a new issue. Include as much detail as you can, and clear steps to reproduce if possible. For more guidance, review our bug report documentation.

Creating a pull request

Want to contribute a new feature? Please first open a new issue to discuss whether the feature is a good fit for the project.

Once you've decided to commit the time to seeing your pull request through, please follow our guidelines for creating a pull request to make sure it's a pleasant experience. See "Setting up" for details specific to working on this package locally.

Support

Github issues aren't for general support questions, but there are other venues you can try: https://wp-cli.org/#support

This README.md is generated dynamically from the project's codebase using wp scaffold package-readme (doc). To suggest changes, please submit a pull request against the corresponding part of the codebase.

About

Allow to associate extra taxonomies and post meta to each post imported via WXR generated by the Wordpress export feature

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages