Skip to content
JayWood edited this page Feb 24, 2017 · 5 revisions

Admittedly I suck at documentation, but I do my best. Below is a list of the options for post generation. If you feel I've not completely covered everything, feel free to create a PR.


Generate Options

wp jw-random posts

--type=<post_type> - Default: post
Determines the post type of the generated posts.

--post_status=<post_status> - Default: publish The status you want the inserted posts set to.

--n=<post_count> - Default: 1
How many posts you want to generate

--author=<id> - Default: 1
Sets the author ID of the posts, defaults to the site admin ( typically ID 1 ).

--tax=<taxonomy_slug>
What taxonomies to generate terms for, if not set, no terms will be created.

Taxonomy slugs can be separated by commas if you need more than one.

--tax-n=<term_count> - Default 3
How many terms to generate per taxonomy slug.

--featured-image
If this is set, featured images will be set for the posts.

--image-size=<width,height> - Default: 1024,768
Determines the image size from lorempixel.com when downloading. It's typically a good idea to set this large enough so your image resizing can handle it without squishing or stretching.

--img-type=<provider_slug> - Default: random
Sets the image category from lorempixel.com, the following options are available:

  • abstract
  • sports
  • city
  • people
  • transport
  • animals
  • food
  • nature
  • business
  • cats
  • fashion
  • nightlife
  • fashion
  • technics

--site=<site_id>
IF this is set, and the site is multi-site enabled. A switch to blog occurs to this blog ID so posts are imported to this ID.

Clone this wiki locally