Plugins & Themes Demos using Template

Overview

This guide will show you how to configure demos for your premium plugins or themes using the Softaculous Cloud and Templates feature.
You can create a template of any website and then use it to quickly restore new websites for demos or testing purposes. The website launched using template includes all installed plugins, themes and configuration so it is an exact replica of what you configured.
The template can be configured as public so you can launch a demo without even having to login to your Softaculous Cloud account.

Install Plugins or Themes

Login to your Softaculous Cloud account.
Install a script on your sandbox domain. Let’s use WordPress as an example script for this tutorial.

Once the script is installed you can login to the admin panel of the Sandbox website using the success links as shown in the screenshot below.

Once you are logged into the script you can install your premium plugins or themes, which you wish to showcase to your clients and enable them to preview.
Tip: You can create multiple sandbox installations and templates for different plugins and themes as per your needs.

Create Template

Once you have setup all configuration, navigate to the Softaculous WordPress Manager and click on the Create Template option to access the template creation page.

Give the template a good name for you to identify and share. The slug created from the template name will be visible to your users if you choose to make the template Public.

On the template creation page
1. Choose “Public” from the Template Type dropdown if you wish to make your template publicly available for demo creation. If you choose “Private” you can launch the demos via API or login to Softaculous Cloud panel to launch the template and then share the URL to your users.
2. Additionally, you can select the “Don’t Allow Plugins & Themes” checkbox if you prefer users not to be able to install plugins and themes while using the demo. This is recommended so users cannot install plugins like File Manager and download the source code of your premium plugin or theme.

Congratulations! Your template is now ready for creating demos.

Share Template

Navigate to the Templates page, locate the desired template and click on the link icon [🔗] next to it and click to copy the launch demo link.

You can add this link on your website so your users can automatically access the demo or you can share the link with your clients on request.

Launching Demo

GUI

As soon as the launch link is accessed in the browser Softaculous will start the demo install process on the sandbox domain or your custom domain. Once the process is completed the user will be automatically redirected and auto logged in to the WordPress admin panel.

The user can then access the website front-end and admin panel and play with your plugins or themes features.

API

The API will launch the demo and provide the website URL and its Auto login URL to the Admin Dashboard of the new installation.
You will just need to add &api=json at the end of the launch URL you copied from the Templates page to get the results in JSON format.

CURL

curl "https://cloud.softaculous.com/launch/index.php?u=12345&t=cloud-website&api=json"

PHP

// The URL
$url = 'https://cloud.softaculous.com/launch/index.php?u=12345&t=cloud-website&api=json';

// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

// Get response from the server.
$resp = curl_exec($ch);
 
// The response will hold a string as per the API response method. In this case its PHP JSON
$res = json_decode($resp, true);
 
// Done ?
if(!empty($res['done'])){

	print_r($res);

// Error
}else{

	echo 'Some error occured';
	print_r($res['error']);

}

API Response

{
    "done": 1,
    "softurl": "https://u12345.softaculous.dev/wpZ9ZOkCj",
    "auto_login_url": "https://u12345.softaculous.dev/wpZ9ZOkCj/sapp-wp-signon.php?pass=t6wgd6wrkt09e1ia6y5a2hjymhyfnj9v"
}

The API response will be in JSON format.
The successful response will contain three keys:

  1. done : This indicates the launch was successful
  2. softurl : This provides the demo website URL
  3. auto_login_url : This is the link when accessed the user will be auto logged into the demo website’s admin panel.

The unsuccessful response will have the error key which provides the cause of the API failure.

Custom Domain

Coming Soon. You will be able to launch demos on your custom domain by pointing a CNAME record to our domain so your users will see your domain in the demo websites they access.

If you have any questions feel free to contact us at support@softaculous.com

Was this helpful to you?