PHPackages                             wpfor/wp-db-seeder - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. wpfor/wp-db-seeder

ActiveWordpress-package[Database &amp; ORM](/categories/database)

wpfor/wp-db-seeder
==================

WordPress CLI commands for database management

119↓50%PHP

Since Apr 11Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Dmitryfor/wp-db-seeder)[ Packagist](https://packagist.org/packages/wpfor/wp-db-seeder)[ RSS](/packages/wpfor-wp-db-seeder/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

WordPress Database Seeder
=========================

[](#wordpress-database-seeder)

A WordPress CLI package that provides convenient commands for seeding and managing test data in your WordPress database.

Description
-----------

[](#description)

WP DB Seeder allows developers to quickly populate their WordPress installations with dummy data for posts, terms, and other content types. It's perfect for development, testing, and demo environments where you need realistic data without the hassle of manual content creation.

Installation
------------

[](#installation)

### Using Composer

[](#using-composer)

```
composer require wpfor/wp-db-seeder
```

### Manual Installation

[](#manual-installation)

1. Download or clone this repository
2. Place it in your WordPress plugins or mu-plugins directory
3. Require the main file in your WordPress installation

Requirements
------------

[](#requirements)

- WordPress 5.0+
- PHP 7.4+
- WP-CLI

Commands
--------

[](#commands)

#### Seed Posts

[](#seed-posts)

```
wp db:seed posts --post_type= --count=
```

**Options:**

- `--post_type`: (Required) The post type to seed (must exist)
- `--count`: (Optional) Number of posts to generate (default: 10)

**Examples:**

```
wp db:seed posts --post_type=post --count=20
wp db:seed posts --post_type=page --count=5
```

This command generates posts with random titles, content, and excerpts using Faker, and marks them with a special meta key for future management.

#### Seed Terms

[](#seed-terms)

```
wp db:seed terms --taxonomy= --count=
```

**Options:**

- `--taxonomy`: (Required) The taxonomy to seed (must exist)
- `--count`: (Optional) Number of terms to generate (default: 5)

**Examples:**

```
wp db:seed terms --taxonomy=category --count=8
wp db:seed terms --taxonomy=post_tag --count=15
```

This command creates terms with random names and descriptions, and marks them with a special meta key for future management.

#### Link Terms to Posts

[](#link-terms-to-posts)

```
wp db:link terms_to_posts --post_type= --taxonomy=
```

**Options:**

- `--post_type`: (Required) The post type of the posts to link (must exist)
- `--taxonomy`: (Required) The taxonomy of the terms to link (must exist)

**Examples:**

```
wp db:link terms_to_posts --post_type=post --taxonomy=category
wp db:link terms_to_posts --post_type=product --taxonomy=product_cat
```

This command assigns random terms from the specified taxonomy to posts of the specified post type, creating realistic relationships between your seeded content.

#### Delete Seeded Posts

[](#delete-seeded-posts)

```
wp db:delete posts --post_type=
```

**Options:**

- `--post_type`: (Required) The post type to delete from (must exist)

**Examples:**

```
wp db:delete posts --post_type=post
wp db:delete posts --post_type=page
```

This command deletes only the posts that were created using the `db:seed posts` command, leaving your real content untouched.

#### Delete Seeded Terms

[](#delete-seeded-terms)

```
wp db:delete terms --taxonomy=
```

**Options:**

- `--taxonomy`: (Required) The taxonomy to delete from (must exist)

**Examples:**

```
wp db:delete terms --taxonomy=category
wp db:delete terms --taxonomy=post_tag
```

This command deletes only the terms that were created using the `db:seed terms` command, preserving your real taxonomy terms.

How It Works
------------

[](#how-it-works)

The plugin adds metadata to each seeded post or term, allowing it to identify and manage them separately from your real content. This approach ensures that:

1. You can easily delete just the seeded content
2. Your real content remains untouched
3. You can run the commands multiple times without conflicts

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/472a2df7243e980d557bcb989e67da45b7c5a9d7b166f5559bb108b70f3584b4?d=identicon)[Dmitryfor](/maintainers/Dmitryfor)

---

Top Contributors

[![Dmitryfor](https://avatars.githubusercontent.com/u/44753831?v=4)](https://github.com/Dmitryfor "Dmitryfor (3 commits)")

### Embed Badge

![Health badge](/badges/wpfor-wp-db-seeder/health.svg)

```
[![Health](https://phpackages.com/badges/wpfor-wp-db-seeder/health.svg)](https://phpackages.com/packages/wpfor-wp-db-seeder)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90440.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)[wildside/userstamps

Laravel Userstamps provides an Eloquent trait which automatically maintains `created\_by` and `updated\_by` columns on your model, populated by the currently authenticated user in your application.

7511.7M13](/packages/wildside-userstamps)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
