How can I spin up a new website for a registered user automatically?
-
22-04-2021 - |
Вопрос
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!
Решение
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/