What’s a Template?

At version 1.1.0 of the ‘WP Cloud Server’ plugin we split the ‘Servers’ and the ‘Templates’ into their own pages. If you look at a Cloud Server Module such as ‘DigitalOcean’ you will see two new sub-menu options called ‘Templates’ and ‘Add Templates’. So. What is a ‘Template’?

According to the Cambridge Dictionary the word ‘Template’ means;

something that is used as a pattern for producing other similar things

This captures exactly what the role is of ‘Templates’ in the ‘WP Cloud Server’ plugin.

One of the purposes of the plugin is to allow Servers to be created as part of a Hosting Plan, including as ‘Shared’ hosting on an existing Server, or as a Dedicated Cloud Server. The last thing we want to do is stock pile Servers of the required specification, that are just waiting for a customer to purchase it for their new website!

What we want is to create Dedicated Cloud Servers ‘on-the-fly’, as they are required. This is where the ‘Template’ comes in to it’s own. You select the Cloud Provider e.g. DigitalOcean. Select the ‘Add Template’ sub-menu, and then select ‘Location’, ‘CPU’, ‘RAM’, ‘SSD’, ‘Operating System’, etc. Give it a name and save it.

All that happens. is that the details of the server are saved as a ‘Template’. No physical server is created! All we’ve done is create a pattern for producing other similar servers!

This is where the magic starts! When we create a Hosting Plan for a Dedicated Cloud Server, we attach it to a template. When a customer purchases the Hosting Plan the DigitalOcean Module takes the ‘Template’ and builds the server, exactly to the specification that you picked.

But that’s not all. A ‘Template’ has a powerful capability. Instead of picking a fixed location for the Dedicated Cloud Server e.g. London, you can pick ‘User Selected at Checkout’. This means that on the Checkout form the Customer can choose the location of their new Cloud Server from a drop-down menu. The server is then built in the correct Data Center!