Demo Data Creator

Description

DO NOT USE THIS PLUGIN ON A PRODUCTION SITE, OR ON A SITE WHERE YOU NEED TO KEEP THE DATA.

When deleting demo data your ENTIRE WordPress database will be reset, deleting ALL your posts, pages, comments and users. ONLY USE THIS PLUGIN ON A SITE WHERE YOU KNOW THE DATABASE CAN BE WIPED.

If you develop WordPress websites it’s useful to have some demo data in your system while it’s being built. This allows you to check that lists of things are displaying as they should, and that themes are working when they get data in them.

Historically it’s been a pain to add that data in. Either you need to take a backup of another site and use that data, or you need to tediously create multiple users and blogs yourself. No more, not now my Demo Data Creator is in town!

This WordPress, WPMU/MultiSite and BuddyPress plugin gives you a new admin screen where you can enter some parameters, click a button and (after a short wait) random demo data will be created. The parameter options include:

* Number of users to create
* Number of blogs per user (for WPMU/MultiSite)
* Whether users must have a blog
* Number of categories in each blog
* Number of posts in each blog
* Number of paragraphs in each blog post
* Number of pages in each blog
* Number of top-level pages
* Number of levels to nest pages
* Number of comments per post for each blog
* Number of links in blogroll for each blog

For BuddyPress you also have:

* Number of groups
* Number of members per group
* Number of wire posts for each group
* Number of friends per user
* Number of statuses for each user
* Number of wire posts for each user

Post content and comment text is automatically generated from Lorem ipsum text, for post content it’s even HTML-formatted.

Thanks to derscheinwelt for the suggestion and code to create random dates for posts, and Steve at http://slipfire.com/ for the wp_insert_user() code.

Screenshots

  • The demo data admin page

Installation

DO NOT USE THIS PLUGIN ON A PRODUCTION SITE, OR ON A SITE WHERE YOU NEED TO KEEP THE DATA.

When deleting demo data your ENTIRE WordPress database will be reset, deleting ALL your posts, pages, comments and users. ONLY USE THIS PLUGIN ON A SITE WHERE YOU KNOW THE DATABASE CAN BE WIPED.

Install from the WordPress plugin repository using the installer, or put all the files into a /wp-content/plugins/demodata/ directory. Activate from the plugin admin screen.

You can find the Demo Data Creator admin menu option in the “Tools” menu. If you are using WordPress MultiSite (version 3.0 or above) you can find the Demo Data Creator admin menu option in the “Super Admin” menu.

If using WPMU (NOT WordPress 3.0 MultiSite): The plugin should be placed in your /wp-content/mu-plugins/ directory (not /wp-content/plugins/) and requires no activation. So the path to the file should be /wp-content/mu-plugins/demodata.php. Access the form from the “Site Admin” menu in the Dashboard.

FAQ

The plugin deleted all my data! Why?

I have been as clear as I can about the use for this plugin. It creates demo data (posts, pages, comments, users etc) but when you choose to delete that data IT WILL WIPE YOUR ENTIRE WORDPRESS DATABASE.

DO NOT USE THIS PLUGIN ON A PRODUCTION SITE, OR ON A SITE WHERE YOU NEED TO KEEP THE DATA.

When deleting demo data your ENTIRE WordPress database will be reset, deleting ALL your posts, pages, comments and users. ONLY USE THIS PLUGIN ON A SITE WHERE YOU KNOW THE DATABASE CAN BE WIPED.

Why did you write this plugin?

To scratch my own itch when developing sites. Hopefully this plugin helps other developers too.

What about BuddyPress support

The DemoData plugin now supports BuddyPress.

Reviews

Amazing plugin. Save a ton of time

If you are testing web and will re-build your web after all done with all testing. This is the best for you. Even you are live web and need create fake account, seem your website is many member, this is also right option for you. It work great, after import you can delete plugin as well

Great plugin

best plugin to generate demo data. Don’t listen to the inexperienced users whining about their dumb mistakes.

Used it for creating test users

This plugin came in very handy during development of my own plugin. I used it to create a lot of users and it did exactly what it should.

Not sure where all the negativity about wiping the database comes from. Are these users that didn’t read all the warnings? Or did older versions of the plugin not warn about this? Anyway, now it does 🙂

Hey – next time read the damn documentation

I wanted to generate a lot of posts and comments with random dates for testing and found this plug-in and it does the job for me.

It works exactly as it says it will – including deleting everything in your database if you use its Delete button.

Hey – it says it will wipe the database; delete all the data; delete everything in the database; that you should not use it on a production system — it says this in many places in the documentation and the tool panel for the plugin itself. There a warning bordered in red above the Delete button.

What more do you want it to do? Maybe warn you 20 times that you are about to wipe the database completely?? Refuse to delete everything until it sends you an email explaining that “THIS WILL DELETE EVERYTHING IN YOUR DATABASE – ALL POSTS, COMMENTS, PAGES, USERS, CATEGORIES, EVERYTHING — NOT JUST THOSE THINGS CREATED BY THIS PLUG-IN. IT WILL WIPE THE DATABASE CLEAN AND THERE WILL BE NOTHING IN IT!!

The email would give you a code that you would have to enter back on the dashboard. Then it would then call you on your telephone and play a recorded warning in 50 different languages and provide another code that you would enter at the dashboard. And when you did enter it, the whole cycle would be repeated 10 times.

Is that what you want it to do? It would be a whole lot easier to read and understand the documentation before continuing.

Hey – much easier to read the documentation and understand it BEFORE you use this plug-in.

It reminds me of what the Vogon captain said when humans complained that they didn’t know that the earth was scheduled for demolition.

“I’m sorry, but if you can’t be bothered to take an interest in local
affairs that’s your own lookout.”

So, I say “If you can’t be bothered to read the documentation, carefully, that’s your own lookout.”

If you had read the documentation, you would not have been so surprised and horrified when it did what it said it would delete everything.

Read the damn document, ALL OF IT, multiple times would be good.

BACKUP databases (or anything) before doing anything major (or, for that matter, even minor).

I couldn’t find the way to backup databases on my hosting company’s server so I wound up exporting the database, creating a new one, for testing, and importing the export file to the new database. Then I went into wp-config.php and changed the name of the database to the test database.

When I have finished with my testing, I’ll just go change the database in the wp-config.php file to go back to using the original database.

If I want to do more testing, I’ll switch database names again.

There is a quote that applies here:

“He who does not read the documentation is doomed.” Bob Novell, December 19, 2015.

One last thing – one of the things that separates the professionals from the wannabes is reading and understanding documentation. If any doubt remains, the profession looks for more information.

To those who wound up deleting your production database — did you read all of the reviews before you used this plug-in?

No? Ah, well I bet you will next time you look at other plug-in, or such.

Read all 23 reviews

Contributors & Developers

“Demo Data Creator” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.3.4 (2017/01/31)

Fixed deprecation error messages. Fixed lorempixel.com random image links. Tested up to 4.7.2.

1.3.3 (2015/11/17)

Added even more warnings about data loss. DO NOT USE THIS PLUGIN ON A PRODUCTION SITE, OR ON A SITE WHERE YOU NEED TO KEEP THE DATA.

1.3.2 (2014/06/19)

Added more checking for empty $current_site variable. Thanks to Juliette RF for contributing a patch.

1.3.1 (2014/03/09)

Added catch for empty $current_site variable reported at https://wordpress.org/support/topic/little-bug-on-line-60-demodataphp by https://wordpress.org/support/profile/templaries

1.3 (2013/09/18)

Updated user creation to use wp_insert_user(). Many thanks to Steve at http://slipfire.com/ for the code.

1.2 (2013/01/05)

Fixed incorrect function and class calls.

1.1 (2012/09/18)

Added support for creating random post dates (thanks to derscheinwelt for the suggestion and code).

1.0 (2012/01/24)

Added support for random images in pages and posts, thanks to LoremPixum.com. Made delete data warning even more obvious.

0.9.8 (2011/09/26)

Fixed bug that stopped author pages working for automatically created users. Thanks to Zoltán János Jánosi for the fix.

0.9.7.7 (2011/03/05)

Fixed bug when creating users on a site with no domain suffix (for example “http://localhost”)

0.9.7.6 (2010/12/03)

Fixed bug in Plugin Register caused by latest version of WordPress

0.9.7.5 (2010/10/16)

Made the “Delete all data” option clearer to understand

0.9.7.4 (2010/09/09)

Fixed bugs with different version of WordPress (standard and MultiSite) and with BuddyPress

0.9.7.3 (2010/09/02)

Fixed bug when creating users in BuddyPress. This was related to a bug in wp_create_user() which returned an incorrect error for invalid email addresses.

0.9.7.2 (2010/07/10)

Fixed bug where menu option not appearing. Thanks to Lisa Drew from http://lyricalbiz.com/ for help fixing this bug.

0.9.7.1 (2010/07/04)

Updated documentation

0.9.7 (2010/06/23)

Fixed bug with menu in standard WP

0.9.6 (2010/06/18)

Fixed bug caused by with WordPress 3.0 not creating blog tables

0.9.5 (2010/06/11)

Made plugin compatible with WordPress 3.0

0.9.4 (2010/05/14)

Updated plugin URI

0.9.3 (2010/04/20)

Implemented new Plugin Register version

0.9.2 (2010/04/12)

Fixed bug with non-deletion of activity streams

0.9.1 (2010/04/01)

Added Plugin Register code

0.9 (2010/03/23)

Made plugin compatible with standard WordPress

0.8

Added compatibility with BuddyPress 1.2. Converted form to use AJAX where possible.

0.7

Added support link and donate button

0.6

Fixed bug which stopped demo blog tables being created

0.5

Fixed bugs with user wire posts, added support for group wire posts, cleaned up code

0.4

Prepared code for proper translation support, fixed bug with BuddyPress XProfile data, added support for BuddyPress status messages

0.3

Cleaned up code

0.2

Added categories, pages for normal WordPress MU sites. Added BuddyPress groups, group members and user friends BuddyPress-enabled sites.

0.1

Initial version added to WordPress plugin repository