If you are managing a WordPress-based WaaS (Website as a Service) with multiple clients, releasing changes can be a tedious and risky process. With a Managed WP Hosting that has single installs, you need to push each change to every site manually. On the other hand, with a Multisite, you would still have to push changes to the one installation that hosts all your customers. If a release pipeline fails to test a small change and you push it without assurance, your production server could crash, resulting in an outage. The best solution is to have a separate environment to release your changes. This allows you to test changes in production, avoiding outages and making the release process more secure.
But how can you do it with WPCS? #
WPCS allows you to create WordPress Applications without any coding. The platform is built like an apartment building, where your WordPress Applications acts as an entire floor, and each customer’s WordPress Install is an apartment. A “Tenant” refers to your customer’s WordPress website.
There are four essential concepts to know about WPCS: Product, Version, Snapshot, and Tenant. Each time you sell a website, this customer becomes a “Tenant” on your floor.
Here is a step-by-step guide on how to deploy changes to your WordPress-based WaaS:
Zero risk in your WaaS development process #
Suppose you want to make significant changes to your website product, such as enabling your customers to sell products via their website. In that case, it could be a considerable risk to bring down several websites. How can you make these changes safely?
- Create a new version in the Console and give it a name, such as ‘v2’.
- In the version’s Snapshot Editor, add the WooCommerce plugin.
- After installation, head back to the Console and deploy the snapshot.
- Head to the tenant you want to upgrade with WooCommerce, create a manual backup, and give it a name “WooCommerce added.”
- Find the Move to version button under the Actions dropdown in the upper right corner and select the ‘v2’ version you just created.
- After the move is complete, you can activate WooCommerce in the tenant.
- Run safety checks to see if the changes did not break anything after activation. If no errors occur, make these changes over a subset of your customers. Create backups and test accordingly.
- When the changes won’t affect any of the sample sizes, you can confidently execute the changes over all your customers.
Why create a new version just to add a plugin? You could add the plugin in the Snapshot Editor of ‘v1’ and deploy that snapshot. However, when working with several websites, you do not want to make changes to the entire application without safety measures. WPCS Versions provide that safety measure, allowing you to test your changes before moving all your tenants over. Suppose you find an exception to the rule, that one tenant that has a unique setup or integration. In that case, you can create a new snapshot based on that tenant’s configuration and deploy it to a new version, making sure the changes won’t break their setup.
Monitor the releases #
It’s essential to monitor your releases to catch any errors or issues as soon as possible. You can use monitoring tools like New Relic or CloudWatch to keep an eye on your application’s performance and track errors or issues. You can also create a release checklist and use it every time you deploy changes to ensure you don’t forget any critical steps.
In conclusion, releasing changes to a WordPress-based WaaS can be a challenging process, but with the right approach, you can do it confidently and securely. By using WPCS Versions, Snapshots, and Tenants, you can deploy changes safely and monitor your releases effectively. With these steps in mind, you can provide the best service to your customers and keep your production server running smoothly.