We have created a bunch of custom plugins at our agency, and the whole packaged website is like a ‘product’ at hand.
Is there a way to scale this in a way that we can give out a free trial, where when a user registers a new website gets spinned up as a duplicate of the original “product” under a subdomain?
At present we have a bash script that we run manually for a new user, and the ‘product’ site gets duplicated on a subdomain (which we create before running the script)
But I’m wondering if there is a way to automate this via API calls or something.
Alternatively, is multisite a better option to implement this? I have refrained from multisite as it doesn’t let me copy plugin settings etc into a new child site, so setting up a child site from scratch is another pain to avoid
for me, StackExchange = hope!
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
The easiest way I have found to do this is to set up a Multisite installation with subdomain installs, and run the plugin “WP Ultimo” to manage signups. It does exactly what you’re looking for: duplicates a template site on demand, and activates various plugins depending on which plan the customer has signed up for. You can offer a 30 day trial subscription for free, you can offer coupons, and Arindo has more recently integrated support for OpenSRS if you want to sell domains through your site. I am not affiliated with them, but I use their product and based on my experience I would recommend it to you. Best of luck!
Reference: https://wpultimo.com/
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0