Seeds dummy content into a WordPress installation for development purposes.
wp package install [email protected]:wpastronaut/wp-cli-seeder.git
Seed to default posts and categories with images:
wp seeder seed posts
wp seeder seed terms
wp seeder attach terms-to-posts
wp seeder seed images
wp seeder attach images-to-posts
Seed to pages:
wp seeder seed posts --post_type="page" --max_depth=4
Seed to custom post type "news" and to custom taxonomy "news_category":
wp seeder seed posts --post_type="news"
wp seeder seed terms --taxonomy="news_category"
wp seeder attach terms-to-posts --post_type="news" --taxonomy="news_category"
wp seeder seed images
wp seeder attach images-to-posts --post_type="news"
Target different languages (currently supports only Polylang):
wp seeder seed posts --post_type="news" --lang="sv_SE"
wp seeder seed terms --taxonomy="news_category" --lang="sv_SE"
wp seeder attach terms-to-posts --post_type="news" --taxonomy="news_category" --lang="sv_SE"
wp seeder seed images --lang="sv_SE"
wp seeder attach images-to-posts --post_type="news" --lang="sv_SE"
wp seeder seed posts
Seeds dummy posts.
[--count=<number>]
How many?
---
default: 30
---
[--post_type=<type>]
Post type.
---
default: post
---
[--post_status=<status>]
Post status.
---
default: publish
---
[--post_author=<login>]
Author.
---
default:
---
[--lang=<lang>]
Post language.
Currently supports only Polylang.
Supported values for Polylang:
- 2 digit ISO 639-1 alpha-2 code (eg. sv)
- 2 digit ISO 639-1 alpha-2 code combined with an ISO 3166-1 alpha-2 code separated with an underscore (eg. sv_SE)
---
default:
---
[--max_depth=<number>]
Max child depth for hierachial post types.
---
default: 1
---
wp seeder seed terms
Seeds dummy terms.
[--count=<number>]
How many?
---
default: 30
---
[--taxonomy=<taxonomy>]
Taxonomy.
---
default: category
---
[--lang=<lang>]
Term language.
Currently supports only Polylang.
Supported values for Polylang:
- 2 digit ISO 639-1 alpha-2 code (eg. sv)
- 2 digit ISO 639-1 alpha-2 code combined with an ISO 3166-1 alpha-2 code separated with an underscore (eg. sv_SE)
---
default:
---
[--max_depth=<number>]
Max child depth for hierachial post types.
---
default: 1
---
wp seeder seed images
Seeds dummy images.
[--count=<number>]
How many?
---
default: 5
---
[--lang=<lang>]
Image language.
Currently supports only Polylang.
Supported values for Polylang:
- 2 digit ISO 639-1 alpha-2 code (eg. sv)
- 2 digit ISO 639-1 alpha-2 code combined with an ISO 3166-1 alpha-2 code separated with an underscore (eg. sv_SE)
---
default:
---
wp seeder attach terms-to-posts
Attach seeded terms to seeded posts.
[--post_type=<type>]
Post type.
---
default: post
---
[--taxonomy=<taxonomy>]
Taxonomy.
---
default: category
---
[--lang=<lang>]
Language of the terms and posts you want to attach.
Currently supports only Polylang.
Supported values for Polylang:
- 2 digit ISO 639-1 alpha-2 code (eg. sv)
- 2 digit ISO 639-1 alpha-2 code combined with an ISO 3166-1 alpha-2 code separated with an underscore (eg. sv_SE)
---
default:
---
wp seeder attach images-to-posts
Attach seeded images to seeded posts as featured images.
[--post_type=<type>]
Post type.
---
default: post
---
[--lang=<lang>]
Language of the images and posts you want to attach.
Currently supports only Polylang.
Supported values for Polylang:
- 2 digit ISO 639-1 alpha-2 code (eg. sv)
- 2 digit ISO 639-1 alpha-2 code combined with an ISO 3166-1 alpha-2 code separated with an underscore (eg. sv_SE)
---
default:
---
Please be aware that your client/co-worker might have used seeded content as a basis of some of real content, so you might accidentally delete some real content while using this command.
wp seeder delete all
Deletes all content seeded by this tool.
wp seeder delete posts
Deletes all posts seeded by this tool.
[--post_type=<type>]
Post type.
---
default: any
---
[--lang=<lang>]
Language of the posts you want to delete.
Currently supports only Polylang.
Supported values for Polylang:
- 2 digit ISO 639-1 alpha-2 code (eg. sv)
- 2 digit ISO 639-1 alpha-2 code combined with an ISO 3166-1 alpha-2 code separated with an underscore (eg. sv_SE)
---
default:
---
wp seeder delete terms
Deletes all terms seeded by this tool.
[--taxonomy=<taxonomy>]
Taxonomy.
---
default: any
---
[--lang=<lang>]
Language of the terms you want to delete.
Currently supports only Polylang.
Supported values for Polylang:
- 2 digit ISO 639-1 alpha-2 code (eg. sv)
- 2 digit ISO 639-1 alpha-2 code combined with an ISO 3166-1 alpha-2 code separated with an underscore (eg. sv_SE)
---
default:
---
wp seeder delete images
Deletes all images seeded by this tool.
[--lang=<lang>]
Language of the images you want to delete.
Currently supports only Polylang.
Supported values for Polylang:
- 2 digit ISO 639-1 alpha-2 code (eg. sv)
- 2 digit ISO 639-1 alpha-2 code combined with an ISO 3166-1 alpha-2 code separated with an underscore (eg. sv_SE)
---
default:
---