WP Manifestindependent plugin directory
manifest / developer / wordpress-enterprise-scaffolder

WP Enterprise Scaffolder

A WordPress plugin/composer package that adds a WP-CLI command to generate large amounts of test data in a WordPress database quickly.

by Mike Bricknell-Barlow · github.com/mike-bricknell-barlow/wordpress-enterprise-scaffolder

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/mike-bricknell-barlow/wordpress-enterprise-scaffolder/archive/refs/heads/main.zip

WP Enterprise Scaffolder is a WordPress plugin that adds a WP-CLI command for rapidly generating very large volumes of test content, including postmeta and terms. It is designed for enterprise-scale performance, load, and infrastructure testing where hundreds of thousands of posts, meta records, and taxonomy terms are required.

The plugin focuses on speed and predictability rather than UI-driven data generation, and is intended to be used in development, staging, or dedicated test environments only.

Why

When testing features or performance improvements on large-scale, enterprise WordPress sites, database size is often a huge factor. Previous methods of generating test content (e.g. wp post generate) can be extremely slow, and doesn't always reflect what a production database of that size would look like.

This plugin makes generating large quantities of realistic test data quick and easy, using batched inserts and avoiding expensive queries.

Features

  • Generate hundreds of thousands of posts in minutes using WP-CLI
  • Currently supports 'posts' only - future updates will enable use for other post types
  • Bulk creation of post meta
  • Assigns taxonomy terms, including hierarchical taxonomies
  • Randomised data generation
  • Minimal memory usage via batched inserts
  • Cleanup command to remove generated data

Requirements

  • WordPress 6.0 or higher
  • WP-CLI
  • PHP 8.0 or higher

Installation

Via Composer or Git

Clone or install the plugin into your WordPress plugins directory:

wp-content/plugins/wp-enterprise-scaffolder/

Activate the plugin via wp-admin or via wp-cli

Usage

Generate test content

wp enterprise_scaffolder generate

Arguments

--total - Optional. The number of posts to create. Default 500,000.

--terms - Optional. The number of terms (categories/tags) to create. Default 100. Set to false to disable term generation/attribution.

--batch-size - Optional. The number of posts to insert to the database at a time. Default 1000.

--status - Optional. Post status to use for created posts. Default 'publish'.

--author - Optional. Author ID to attribute the posts to. Default none (0).

--date - Optional. The date/time to use for the inserted posts. Default current date/time.

Remove test content

wp enterprise_scaffolder clean

Benchmarks

On a small VPS (4 vCores, 4GB RAM), the plugin generated 500,000 posts with 10-20 lines of postmeta and 4-10 terms each, in 1814.7590379715 seconds (30 minutes).