We just raised $735,000 to introduce the world to multi-tenant WordPress.

How to automate your Website as a Service (WaaS) - Storefront included!

Roger Rosweide, co-founder and CCO of WPCS.io, shows you how to automate the sale and launch of your websites using a storefront. Only 2 plugins are covered that make up this automation: WooCommerce and Uncanny Automator.

Better yet, WPCS now also features an additional “Storefront” base snapshot that includes these two plugins and the configurations necessary to set up this API automation quickly and effectively.

To use this snapshot, just spin up a new Product in WPCS and select the Storefront snapshot when creating your first Version. Of course, this snapshot contains only the 2 required plugins and their configurations and isn’t stylized in any way. You can do that however you wish.

In any case, after watching this video and following along with the recipe below, you are ready to automate the sale of your business!

Automating with a Storefront

Create a new “Storefront” Product

Go back to the Product overview and create a new Product. You can call it whatever you want. For our purposes, we’ve called it Storefront. When the Product is ready, launch a new Version with the Storefront Base Snapshot.

Create a tenant

Don’t forget: your Versions only act as a development environment. So, even though you will only launch 1 website in this product, you need to create a Tenant from which you’ll trigger the automation. So, create a tenant inside your version and open the wp-admin.

WooCommerce + Uncanny Automator

For this automation, we’ll use WooCommerce and Uncanny Automator. If you’ve created your Version using the Storefront Snapshot, these are already installed. Make sure your Product in the WP-admin has the proper name you want to use and take note of the Product ID (we will need it when we create a groupName).

Create an API Key

Next, go back to (or create) the Product where you want your tenant(s) to be created and create a new API Key called “Storefront”.

Please note: you can create an API Key in your existing WPCS Product or have an entirely separate one in which you want your new tenants to be created. For this video, we used another Product (but this totally up to you).

Don’t forget the colon between your API Key and API Secret

Convert your API Key and Secret

Go to https://www.base64encode.org/ set the settings to “Encode” and then paste the API Key, insert a colon : and then the API Secret one after the other. Make sure there is no colon in the API Secret when you generate it, otherwise you have 2 (which Base64 finds confusing).

Insert the resulting string into Uncanny Automator

Go to Automator and:

  1. Paste the result from Base64Encode at the Value under Headers behind Basic
  2. Add a Pair. Name this “groupName” (watch the capital N) and then select Product ID

Then go back to Console and create a tenant Snapshot with the groupName corresponding to Product ID (it’s a number!)

Ready to automate! Seriously, it’s that easy. Try it out by “buying” something in the storefront. Of course, you can stylize, customize, and modify the storefront however you like. In any case, your automation now works 🙂

Related articles

Build a Shopify SaaS Clone using WordPress, WooCommerce, WPCS & Kubernetes

Build a WPCS Product in 5 Steps

Build a scalable WordPress SaaS or WaaS (Website as a Service

How to automate your Website as a Service (WaaS) - Storefront included!

How to automate the sale and launch of your websites using a storefront with the WPCS API, WooCommerce, and Uncanny Automator.

Webinar: Merge Sites, Automate, and the Versioning System

Merging your agency’s website portfolio in WPCS where each website has a different tech stack, automate your business with a storefront, and continuously develop your sites like a SaaS.

Getting started with the WPCS Intro Series

Launch your WordPress SaaS in 5 easy steps

Importing A Site Using the WPCS CLI

Using LocalWP to install and build our local WP installation and send it to WPCS with the CLI

Importing a site into WPCS using All in One WP Migration Plugin

How to easily create an export of your existing WP site using the All in One Migration plugin and import this into WPCS as a version.

Endlessly Clone Sites, while ensuring a continuous + safe development cycle

Importing an existing site using All in One WP Migration, quickly clone sites, and manage as ONE

Plugin name

Author

Description

Roger Rosweide, co-founder and CCO of WPCS.io, shows you how to automate the sale and launch of your websites using a storefront. Only 2 plugins are covered that make up this automation: WooCommerce and Uncanny Automator.

Code Snippet