I am happy with how my multisite plugin sandbox is working. I have now been able to spend the required time converting all legacy Instawp sites to my own hardware and multisite installations, all built of my bulletproof VPS and GridPane Stack.
This combination worked well out of the gate and was an excellent idea. The video I recorded on it is still a very good starting point for multisite sandbox automation. Still, I have been able to speed up the process by focusing on the stack they are built with and working on the automation process.
The Process
The process remains essentially unchanged from the video above
- Generate a subdomain name
- Create the sandbox site
- Send a Discord notification
- Send an email
- Wait 2 hours & automatically delete the site
However, a new step has been added after generating our subdomain, which I will cover later.
Stack and Why It’s Important
Our stack on reallyusefulplugins.com to generate these is also well known to me, and subsequently, by keeping it consistent, I have been able to refine the process.
- Flowmattic For Automation
- SureForms for submission of the request for a sandbox
- Emailit for email delivery
- Response for SureForm for returning the automation output to the form as you can’t do this natively without response for sureform unless you use SureTriggers
The Below bubble shows you just how quick and efficient this stack is
Stack is essential, so I have kept it consistent on the sandbox side too, sticking to a tight stack and a set of self-updating MU plugins to handle standard notices and information for users. This stack consists of
- A plugin to deliver notices to the user about the system they are using and to give them hints and tips, including to make sure they have a checkout page for SureCart
- Email delivery via my emailit API plugin but limited to the “main site only” to prevent spam
- SureEmails to let users set up their own email delivery if they wish
- My automatic SureCart Activation scripts for plugins licensed through SureCart that they are testing like Video Bank Pro
- As well as any required plugins they need to work with the plugin they are trying.
You can see the example notices below:

This consistency allowed the duplicate form to be used to get a dedicated form for the new sandbox and change the webhook location to the duplicated workflow. Once this was done, Response for SureForms would route the new form to the correct webhook for me and receive the data back to display to the user as shown in the above bubble.

I would then duplicate and edit the workflow, I got about half way through doing this when I decided it wasn’t efficient enough and I needed a way to make the flow design more efficient as effectively I was reusing the same information over and over and changing four single items in each flow just in multiple places.
I didn’t like how inefficient this was, and this led to the change in workflow and the step I’ve added after generating my subdomain.
The new step to efficiency
I was effectively only changing four things in each setup that were not part of my flow, and these where
- Plugin Name – I.e Post Manager Pro for SureCart
- The API secret for the MultiSite API, i.e XXXXXXXXXXXXXX
- The base domain for the Multisite i.e postaccessmanager.wpdemo.uk
- The title for the new Sub Site, i.e Post Manager for SureCart Sandbox
Now, with these bits of information, I may manipulate and combine them with others, i.e the generated subdomain and the base domain for the response body and the email delivery. Still, they were always the same through the response. This meant I needed to find a way to efficiently add these to my workflow.
Flowmattic has variables that allow you to set “global variables” you can use in any workflow and it also lets you set a variables value within a workflow but as far as I am currently aware it has no way to set multiple values at once within a workflow for efficiency and as such I looked to leverage my most used FlowMattic feature, lets write a function that accepts any input and returns them as individual variables and that’s what I did.
Below is the setup of that function and how the individual parameters are passed and then how they are returned by the PHP function to flowmattic and this then makes them inflow variables ready to use.

The magic of this is its simplicity. We literally pass the variables to the script and ask it to return them to us one at a time. There is nothing fancy going on here; it is just an efficient, easy methodology for returning any number of variables into the workflow.
<?php
function flowmattic_dynamic_return(...$inputs) {
// Combine the inputs into an associative array and return it
$output = [];
foreach ($inputs as $key => $value) {
$output[$key] = $value;
}
return $output;
}
PHPI then set about replacing anywhere I used those four items with their new “returned” values and tested the flow; this effectively now meant by changing this new steps values before the go into the PHP function they would then be set with the new values this means that by duplicating the workflow now I only need to change these four variables and the workflow is updated, because I was able to use these four items to update API update locations, domains, etc all dynamically with these four variables.
This makes my process for launching the back end of the site a 3-stage process that takes less than two minutes from start to finish to get the backend of a multisite installation ready (excluding setting up the actual multisite installation)
- Duplicate the SureForm
- Duplicate the Workflow, update the variables, and copy the webhook address
- Select from in Response for SureFrom and set to webhook address of new workflow
You can see it in action in the bubble below
And we are done. Now that is efficiency
This allowed me to quickly and effortlessly transfer all sandbox testing to my own setup and for it to be quicker, cheaper and more efficient all with the help of a little WordPress automation and a rock solid stack!