PHPackages                             rmp-up/wp-fixtures - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. rmp-up/wp-fixtures

ActiveLibrary[Testing &amp; Quality](/categories/testing)

rmp-up/wp-fixtures
==================

Expressive fixtures persistence in WordPress (and some plugins)

0.8.1(5y ago)73.8k[4 issues](https://github.com/rmp-up/wp-fixtures/issues)[1 PRs](https://github.com/rmp-up/wp-fixtures/pulls)proprietaryPHPPHP ~7.0CI failing

Since Sep 10Pushed 5y ago1 watchersCompare

[ Source](https://github.com/rmp-up/wp-fixtures)[ Packagist](https://packagist.org/packages/rmp-up/wp-fixtures)[ RSS](/packages/rmp-up-wp-fixtures/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (7)Dependencies (16)Versions (15)Used By (0)

[![Build Status](https://camo.githubusercontent.com/43e5da3891ef8cd96acfda84da559982326133ac2372137d13fa1f20ec053863/68747470733a2f2f7472617669732d63692e6f72672f726d702d75702f77702d66697874757265732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/rmp-up/wp-fixtures)[![Coverage Status](https://camo.githubusercontent.com/466a97363c1c3ba39712631c83fe0abcaa5faa3ff7a98699eb7657c0baf803f0/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f726d702d75702f77702d66697874757265732f62616467652e737667)](https://coveralls.io/github/rmp-up/wp-fixtures)

WordPress Fixture Generator
===========================

[](#wordpress-fixture-generator)

> Expressive fixtures persistence in WordPress (and some plugins).

GDPR and fluent data is a PITA while developing solutions to specific problems for your customers. [Faker](https://github.com/fzaninotto/Faker)and [Alice](https://github.com/nelmio/alice)is already there for Symfony, Nette, Zend and now for WordPress to ...

- ... create data using wp-cli or plain PHP.
- ... generate **tons of pages, posts, comments, products and more** with just a few YAML-lines
- ... seed WordPress with **specific use-cases for testing**

Overall the goal is **simplicity** and **no time wasting crap** (for me and you) which we achieve by using raw WordPress structures in the YAML instead of reinventing the wheel.

By now we bring helper for:

- **WordPress** 4.6 - 5.4, e.g. posts, pages, user, options etc.

See below how a small Yaml-File can seed the database with tons of entries or [read the documentation](https://github.com/rmp-up/wp-fixtures/releases)to find out more about entities and possibilities.

Install
-------

[](#install)

Download or just

```
composer install --dev rmp-up/wp-fixtures

```

We mostly require what Alice also needs ([see Packagist.org for more details](https://packagist.org/packages/rmp-up/wp-fixtures)):

- PHP
- WordPress

Optional:

- wp-cli 2, which eats YAML and seeds the DB for you

Tests expand continuously to cover a bigger range one day (see Travis CI).

Usage
-----

[](#usage)

Lets define one simple page, multiple posts by random users and plenty of comments within one yaml:

```
WP_Post:
  page_1:
    # Well known wp_insert_post() structure
    post_type: page
    post_title: Imprint
    post_content: |
      Beth Doe
      Meestreet 42
      1337 Muskegon
    meta_input:
      simple: 1
      flat: # will append like add_post_meta
      - penny
      - claire
      - emily
      - lucy
      complex: # will be serialized
        company: True TV
        best: Ellen

  # or with abbreviated field-names
  post_{1..10}:
    author: ''
    title: ''
    content: ''

WP_Comment:
  # 100 comments randomly spread among posts
  comment_{2..102}:
    post_ID: '@post_'
    content: ''
```

Other possible entities:

- Options
- WP\_Comment
- WP\_Post
- WP\_Role
- WP\_Site
- WP\_Term
- WP\_User

License
-------

[](#license)

Copyright 2019 Mike Pretzlaw (mike-pretzlaw.de)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance9

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

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.

###  Release Activity

Cadence

Every ~83 days

Recently: every ~122 days

Total

8

Last Release

1853d ago

PHP version history (2 changes)0.7.0PHP ~7.0

0.9.0-rc.1PHP ~7.0|8.0.\*

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/24290366?v=4)[Pretzlaw](/maintainers/pretzlaw)[@pretzlaw](https://github.com/pretzlaw)

---

Tags

testwordpressFixturefakerdata

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/rmp-up-wp-fixtures/health.svg)

```
[![Health](https://phpackages.com/badges/rmp-up-wp-fixtures/health.svg)](https://phpackages.com/packages/rmp-up-wp-fixtures)
```

###  Alternatives

[nelmio/alice

Expressive fixtures generator

2.5k43.4M133](/packages/nelmio-alice)[zenstruck/foundry

A model factory library for creating expressive, auto-completable, on-demand dev/test fixtures with Symfony and Doctrine.

78311.9M97](/packages/zenstruck-foundry)[theofidry/alice-data-fixtures

Nelmio alice extension to persist the loaded fixtures.

32528.5M70](/packages/theofidry-alice-data-fixtures)[nyholm/nsa

See everything and do whatever you want. No privacy rule will stop us. Used in tests, debugging and fixtures to access properties and methods.

2286.0M79](/packages/nyholm-nsa)[trappar/alice-generator

Automatically generates alice fixture based on a set of objects

52185.4k1](/packages/trappar-alice-generator)[wp-phpunit/wp-phpunit

WordPress core PHPUnit library

803.7M208](/packages/wp-phpunit-wp-phpunit)

PHPackages © 2026

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