{"id":184246,"date":"2024-02-19T17:45:09","date_gmt":"2024-02-19T17:45:09","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/test-content-generator\/"},"modified":"2025-04-07T15:06:50","modified_gmt":"2025-04-07T15:06:50","slug":"test-content-generator","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/test-content-generator\/","author":2061015,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.4.4","stable_tag":"0.4.4","tested":"6.7.5","requires":"4.0","requires_php":"8.3","requires_plugins":null,"header_name":"Test Content Generator","header_author":"Keith Drakard","header_description":"Intended for plugin and theme developers, this lets you quickly generate a test site full of random users, posts, comments, tags and images. Go to Tools-><strong>Content Generator<\/strong> to use.","assets_banners_color":"","last_updated":"2025-04-07 15:06:50","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/drakard.com\/","rating":5,"author_block_rating":0,"active_installs":30,"downloads":1794,"num_ratings":2,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","changelog"],"tags":{"0.0.1":{"tag":"0.0.1","author":"keith_wp","date":"2024-02-19 17:44:25"},"0.4.2":{"tag":"0.4.2","author":"keith_wp","date":"2024-08-26 14:04:46"},"0.4.4":{"tag":"0.4.4","author":"keith_wp","date":"2025-04-07 15:06:50"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":2},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3038088,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3038088,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.0.1","0.4.2","0.4.4"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3067434,"resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3067434,"resolution":"2","location":"assets","locale":""},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3067434,"resolution":"3","location":"assets","locale":""},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3067434,"resolution":"4","location":"assets","locale":""},"screenshot-5.png":{"filename":"screenshot-5.png","revision":3067434,"resolution":"5","location":"assets","locale":""},"screenshot-6.png":{"filename":"screenshot-6.png","revision":3067434,"resolution":"6","location":"assets","locale":""},"screenshot-7.png":{"filename":"screenshot-7.png","revision":3067434,"resolution":"7","location":"assets","locale":""}},"screenshots":{"1":"Generating new test <em>Posts<\/em>.","2":"An example of the output using the <em>Polite<\/em> theme.","3":"Create any role of user in the <em>Users<\/em> screen.","4":"Adding <em>Images<\/em> to your Media Library.","5":"The <em>Custom Post Type<\/em> and <em>Custom Taxonomies<\/em> can be enabled separately.","6":"Add test terms to all of your <em>Taxonomies<\/em>.","7":"Fill out your frontend by adding <em>Comments<\/em> to your content."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[40645,1259,224540,188037,4574],"plugin_category":[],"plugin_contributors":[89145],"plugin_business_model":[],"class_list":["post-184246","plugin","type-plugin","status-publish","hentry","plugin_tags-lipsum","plugin_tags-lorem-ipsum","plugin_tags-test-content","plugin_tags-test-posts","plugin_tags-wp-cli","plugin_contributors-keith_wp","plugin_committers-keith_wp"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/test-content-generator\/assets\/icon-128x128.png?rev=3038088","icon_2x":"https:\/\/ps.w.org\/test-content-generator\/assets\/icon-256x256.png?rev=3038088","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/test-content-generator\/assets\/screenshot-1.png?rev=3067434","caption":"Generating new test <em>Posts<\/em>."},{"src":"https:\/\/ps.w.org\/test-content-generator\/assets\/screenshot-2.png?rev=3067434","caption":"An example of the output using the <em>Polite<\/em> theme."},{"src":"https:\/\/ps.w.org\/test-content-generator\/assets\/screenshot-3.png?rev=3067434","caption":"Create any role of user in the <em>Users<\/em> screen."},{"src":"https:\/\/ps.w.org\/test-content-generator\/assets\/screenshot-4.png?rev=3067434","caption":"Adding <em>Images<\/em> to your Media Library."},{"src":"https:\/\/ps.w.org\/test-content-generator\/assets\/screenshot-5.png?rev=3067434","caption":"The <em>Custom Post Type<\/em> and <em>Custom Taxonomies<\/em> can be enabled separately."},{"src":"https:\/\/ps.w.org\/test-content-generator\/assets\/screenshot-6.png?rev=3067434","caption":"Add test terms to all of your <em>Taxonomies<\/em>."},{"src":"https:\/\/ps.w.org\/test-content-generator\/assets\/screenshot-7.png?rev=3067434","caption":"Fill out your frontend by adding <em>Comments<\/em> to your content."}],"raw_content":"<!--section=description-->\n<p>Developing any WP plugin or theme often means needing to test it against as much of a \"real site\" as your development environment will allow, and if you're adding that test data by hand, it gets pretty tedious pretty quickly.<\/p>\n\n<p>This plugin will let you use either <a href=\"https:\/\/wp-cli.org\/\">WP-CLI<\/a> commands, or the admin page in Tools-&gt;<strong>Content Generator<\/strong> to add test users, populate the Media Library with example images, an additional test custom post type and custom taxonomies, generate as many test \"<em>Lorem Ipsum<\/em>\" posts as you want, and then add comments to those posts.<\/p>\n\n<p>Each of those \"<em>Lorem Ipsum<\/em>\" posts will be randomly tagged and categorised, and can also be assigned one of the test images as its Featured Image, as well as a variety of HTML content in addition to the usual paragraphs.<\/p>\n\n<p>This plugin is primarily for people who need to test plugins and themes on a regular basis, but it would let anyone get a feel of how their site will look when it's full of real content.<\/p>\n\n<h3>Workflow<\/h3>\n\n<p>All the parts of this plugin are optional, and each can be repeated as much as you want, depending on which parts of your site you want to test.<\/p>\n\n<p>However, no individual step will \"backfill\" preceeding ones automatically, so if you have an empty site and you want (eg.) your test <em>Posts<\/em> to appear to have been written by different people, then you need to add the test <em>Users<\/em> first.<\/p>\n\n<p>ie.<\/p>\n\n<ul>\n<li>Enable <strong>Custom<\/strong> (Post Types &amp; Categories &amp; Tags) before adding terms from your <strong>Taxonomies<\/strong>,<\/li>\n<li>Add <strong>Users<\/strong> before downloading <strong>Images<\/strong> before generating <strong>Posts<\/strong> before adding <strong>Comments<\/strong>.<\/li>\n<\/ul>\n\n<h3>WP CLI Integration<\/h3>\n\n<p>Using the plugin defaults, you can populate a test site with just the following commands:<\/p>\n\n<ol>\n<li><code>wp plugin install test-content-generator --activate<\/code>\nDownload and activate the plugin.<\/li>\n<li><code>wp test users --amount=20<\/code>\nAdd 20 random Editor\/Author\/Contributor\/Subscribers users who have registered within the last 60 days.<\/li>\n<li><code>wp test taxonomies --amount=50<\/code>\nAdd 50 taxonomy terms split between Categories and Post Tags.<\/li>\n<li><code>wp test images --amount=10<\/code>\nAdd 10 images of size 800x400 uploaded by any Editor\/Author.<\/li>\n<li><code>wp test posts --amount=40<\/code>\nAdd 40 Posts written within the last 60 days by any Editor\/Author\/Contributor, with a Featured Image and both categorised and tagged.<\/li>\n<li><code>wp test comments --amount=100<\/code>\nAdd 100 comments to your Posts written within the last 60 days by any of the registered users.<\/li>\n<\/ol>\n\n<p>See <code>wp help test<\/code> for more details.<\/p>\n\n<!--section=changelog-->\n<h3>0.4.4<\/h3>\n\n<ul>\n<li>Fix: Stopped creating deprecated dynamic properties for PHP 8.3<\/li>\n<\/ul>\n\n<h3>0.4.3<\/h3>\n\n<ul>\n<li>Tested against 6.7.2<\/li>\n<li>Fix: Moved the translation text domain loading to later in the init<\/li>\n<\/ul>\n\n<h3>0.4.2<\/h3>\n\n<ul>\n<li>Tested against 6.4.3, 6.5 and 6.6.1<\/li>\n<li>Fix: Moved the run() callback of register_setting() into the abstract class (DRY)<\/li>\n<li>Fix: Switched use of rand() to wp_rand() to stop the plugin check whining<\/li>\n<li>Fix: Added translator notes for the various placeholders<\/li>\n<\/ul>\n\n<h3>0.4.1<\/h3>\n\n<ul>\n<li>Fix: Changed how some string arrays are passed via CLI to be consistent<\/li>\n<li>Fix: Uses gmdate\/wp_json_encode instead of date\/json_encode<\/li>\n<\/ul>\n\n<h3>0.4<\/h3>\n\n<ul>\n<li>Feature: Added WP-CLI integration<\/li>\n<\/ul>\n\n<h3>0.3<\/h3>\n\n<ul>\n<li>Tested against 6.4 and 6.3.2<\/li>\n<li>Feature: Added ability to fill media library from https:\/\/picsum.photos\/<\/li>\n<li>Feature: Added featured images, user creation, comment creation<\/li>\n<li>Feature: Added a better settings page<\/li>\n<li>Initial public release<\/li>\n<\/ul>\n\n<h3>0.2<\/h3>\n\n<ul>\n<li>Feature: Added the lipsum routines to generate posts and terms<\/li>\n<\/ul>\n\n<h3>0.1<\/h3>\n\n<ul>\n<li>Original plugin - add some test posts<\/li>\n<\/ul>","raw_excerpt":"Quickly generate a test site full of random users, posts, comments, tags and images.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/184246","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=184246"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/keith_wp"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=184246"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=184246"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=184246"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=184246"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=184246"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=184246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}