The problem is fairly common. You’re a WordPress developer that builds themes or plugins and you want to offer users visiting your site a simple demo so they can explore your product a bit. You can set up a dummy account somewhere, install your product, create a user with limited capabilities and add some dummy content. But what if you want users to each have their own sandbox so they can add and delete content without permanently effecting the site? What if you want to give instructions only to these users? How on earth can you prevent spambots from polluting your sites?
There are, of course, solutions for all of these problems. In fact, the WP Ninjas team looked into this problem and decided to create an all-in-one solution for this—called Ninja Demo. It allows you to easily create a demo site for any product that users can log into, play around with, and leave without a trace. I was able to take the plugin for a bit of a test spin, and though it is still in its early stages, I think it can be the right fit for a lot of plugin and theme developers out there.
It works by harnessing the power of WordPress multisite to create new, sandbox environments on the fly each time a new user tries out the demo. You get started with the plugin by creating a new multisite install, activating the Ninja Demo plugin network wide, then creating a new user to be used as the demo user. The Ninja Demo settings page on your main site gives you a list of all of the pages in your WordPress admin, with checkboxes next to each. Simply check off the pages you want to allow demo users access to, and you’ll be all set up and ready to go.
You can fill the site with whatever content you want, though it should obviously contain dummy content tailored towards the product you are showing off. When a demo user activates a new sandbox, they will be able to add new content, delete old content, change settings, and generally play around with your site however they want. But none of these changes will be visible to any other users, and the changes will be deleted once the sandbox session expires.
Ninja Demo gives you access to a handful of shortcodes so that you can specify that certain content should only be shown to users in a sandbox, to those that haven’t logged in yet, or to those who have had their sandbox session expire. So how can demo users actually log into your site? Just place the [[try_demo]] shortcode anywhere in your posts and pages, and a form will be published with a simple addition or subtraction problem (What does 9-7 =). If a user answers correctly, they are logged in as a demo user and a new personal sandbox is automatically created for them. And just like that, instant spam protection.
I installed WordPress multisite and got Ninja Demo up and running in about 20 minutes. Since no data leaks from one sandbox to another, you can basically delete the entire site as a demo user and there’s no effect on the main site. Everything runs fairly smooth, and it was pretty easy to learn the ropes once I was up and running. I found out, for instance, that you can change the demo users role (editor, subscriber, etc.) for increased control over their privileges. In the test site I set up, I ran about 50 sandboxes and didn’t hit a snag. The WP Ninja’s team informed that their Ninja Forms demo page has had over 2,000 sandboxes and counting, and they still haven’t hit any major problems. No surprises there though, since WordPress multisite is built to accommodate a very, very large number of simultaneous sites.
And for the developers out there, there are also several filters, hooks and functions available to extend the functionality of the plugin, from limiting individual posts, menu items, and post types to sandboxed users or guests to a full authentication function to determine if a demo user is logged in.
A Ninja Demo license starts at $59 for a single installation and ranges to $249 for unlimited. It’s already in use by SearchWP, NinjaForms, and the Volatyl Framework. The team told me they are just getting started, and I’m inclined to believe them, so be on the lookout for bigger and better innovation.
Has anyone used Ninja Demo yet? Share your thoughts in the comments below!
Jay Hoffmann is a WordPress developer hailing from NYC. In the strictest sense of the word, he is a WordPress enthusiast with an eye for front-end development and design. He has been working with WordPress since 2006 and currently works for a popular children’s media company. This year, Jay started Tidy Repo, a curated list of the best and most reliable plugins from around the web. You can also follow Jay on Twitter.