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

122↓95.7%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 1w 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

Maintenance32

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity16

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://avatars.githubusercontent.com/u/44753831?v=4)[Dmitryfor](/maintainers/Dmitryfor)[@Dmitryfor](https://github.com/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

[jdorn/sql-formatter

a PHP SQL highlighting library

3.8k117.8M121](/packages/jdorn-sql-formatter)[backup-manager/backup-manager

A framework agnostic database backup manager with user-definable procedures and support for S3, Dropbox, FTP, SFTP, and more with drivers for popular frameworks.

1.7k1.6M11](/packages/backup-manager-backup-manager)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M88](/packages/propel-propel1)[insolita/yii2-migration-generator

Set of gii tools for generating files for migration by schema of table , phpdoc or table data

108508.0k5](/packages/insolita-yii2-migration-generator)[xpdo/xpdo

A PDO-based Object/Relational Bridge Library

7088.4k4](/packages/xpdo-xpdo)[voku/session2db

A PHP library acting as a wrapper for PHP's default session handling functions which stores data in a MySQL database, providing both better performance and better security and protection against session fixation and session hijacking.

2920.0k](/packages/voku-session2db)

PHPackages © 2026

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