Personal tools


Server Allocator For WHMCS

From ModulesGarden Wiki
Jump to: navigation, search


About Server Allocator For WHMCS

Server Allocator For WHMCS will allow to automatically switch servers when placing an order depending on previously set rules.

Module lets you create and configure your own switch rules, split them into groups and assign to them specified servers and product groups.
Rules are very flexible because they are based on chosen configurable options, product addons and custom fields.

  • Admin Area Features:
✔ Add/Edit/Remove Switching Rules
✔ Add Multiple Conditions/Products/Servers To Switching Rule
✔ Assign Multiple Rules To Rules Group
✔ Set Default Servers To Rules Group - Used If No Rule Is Applied
✔ Set Load Balancing Allocation Type To Server With Most Or Least Free Space
✔ Access Links To Order Form Of Products Configured According To Specified Rule
  • Client Area Features:
✔ Switch Assigned Server Automatically During Ordering Product - Depending On Applied Rule
  • Supported Rule Definitions:
✔ Configurable Options
✔ Custom Fields
✔ Product Addons
  • General Info:
✔ Supports All Server Types
✔ Supports Most Provisioning Modules
✔ Multi-Language Support
✔ Supports PHP 7.2 Up To PHP 7.4
✔ Supports WHMCS V7.10 And Later
✔ Easy Module Upgrade To Open Source Version

Installation and Configuration

This tutorial will show you how to successfully install and configure Server Allocator For WHMCS.

We will guide you step by step through the whole installation and configuration process.

1. Log in to our client area and download the module.
SA 1.png
2. In the downloaded file you might find one or two packages that support different PHP versions.

In the most recent versions of the module, you will find only one package that supports PHP 7.2 and later.

PHP72 74.png
Previous updates of the module may contain two packages dedicated to various PHP versions.

The first one that supports PHP 5.6 up to PHP 7.1, and the second one addressed to PHP 7.2 up to PHP 7.4.
Note: Keep in mind that PHP versions 5.6 up to 7.1 are no longer officially supported and their security issues are not fixed or released any more. Find more info here.

PHP56 74.png
Note: You can check the current PHP version in your WHMCS. To do so, proceed to 'Utilities' → 'System' → 'PHP Info'.
3. Extract the package and upload its content into the main WHMCS directory.

The content of the package to upload should look like this.

4. When you install Server Allocator For WHMCS for the first time you have to rename 'license_RENAME.php' file.

File is located in 'modules/addons/serverswitcher/license_RENAME.php'. Rename it from 'license_RENAME.php' to 'license.php'.

SA 3.png
5. In order to configure your license key, you have to edit a previously renamed 'license.php' file.

Enter your license key between quotation marks as presented on the following screen. You can find your license key in our client area → 'My Products'.

SA 4.png
6. Now you have to activate the module in your WHMCS system.

Log in to your WHMCS admin area. Go to the 'Setup' 'Addon Modules' . Afterwards, find 'Server Allocator' and press 'Activate' button.

SA 5.png
7. In the next step you need to permit access to this module.

To do so click on 'Configure' button, tick 'Access Control' near desired admin role groups and press 'Save Changes'.

SA 6.png
8. You have just successfully installed Server Allocator For WHMCS!


Server Allocator For WHMCS allows you to automatically switch to wanted server upon specific product configuration.
SA 7.png

Add Group

In order to configure switching rules, proceed with creating of a new group.

Press 'Add Group' to proceed.

SA 8.png
Fill in group name and select desired product groups.

Additionally, select default servers (Ctrl+mouse click for multi select) if you wish to redefine default servers.
Press 'Save' to create group.

SA 9.png

Group Management

Previously created group currently does not affect the system at all.

Let's change that through adding a new rule. Press 'Add Rule' to proceed.

SA 10.png
In the next step select server type that the switch will apply to.

Press 'Next'.

SA 11.png
Each rule can have multiple rule definitions.

Important: Switch will be made only if all of the rule definitions are met.
Let's add first rule definitions, adding it starts with selecting rule definitions type.
To do so, press 'Add Definition' and choose desired one.

SA 12.png
For the purpose of this documentation, we have chosen configurable option rule definition.

Now, we have to select specific configurable option and its value which needs to be chosen.

SA 13.png
Let's add one more rule definition, which in this case will be using product addon.

Press 'Add Definition' → 'Addon' and choose product addon.

SA 14.png
Now, define the load balancing allocation type. Decide if the server with the most or least free space shall be used and press 'Save Changes' button.
SA 15.png

Rule Management

Each group and rule can be modified and removed at any time through using buttons marked on the following screen.
SA 16.png
Press 'Links' next to desired rule to view the list of links.
SA 17.png
Each of them leads to the order form with product configured according to defined rule.
SA 18.png

Sample Orders

In this section we will show you how our module works on an exemplary rule shown below.
SA 18 1.png

First Order

Let us order a product fulfilling all conditions for receiving 'cPanel SSD - 99.9' server.

Using this configuration, client pays additionally for 'Based On SSD' addon.

SA 19.png
The switch will be made upon ordering the product (order made from the client area) or accepting the order (order made from the admin area).

Hosting with a switched server is displayed on the following screen.

SA 20.png

Second Order

Let us order a product fulfilling all conditions for receiving 'cPanel SSD - 99.99' server.

Client must pay for 'Based On SSD' as well as for higher guaranteed uptime.

SA 21.png
As displayed on the following screen, the switch has been made successfully.
SA 22.png

Third Order

Let us order a product without 'Based On SSD' addon and with default uptime.

This should result in assigning default 'cPanel - 99.9' server.

SA 23.png
As you can see, switch has not been made and hosting is using default group server.
SA 24.png


1. In case none of the configuration settings meet any rule, the product will be assigned to a default server.

Update Instructions

Essential guidance through the process of updating the module is offered here.

Keep in mind there is a quick and easy option in our client area that will let you upgrade the license of your module to an open source version at any time - and at a lower price!
To take advantage of it, simply use the License Upgrade button located on the product's page and a discounted invoice will be generated automatically.

Common Problems

1. When you have problems with connection, check whether your SELinux or firewall does not block ports.
2. You are unable to add a product addon/configurable option/custom field to the rule.

Reason: An item has to be assigned to a product which:

  • Is assigned to a product group included into the switching group.
  • Product is of a type selected during adding a new rule.

Solution: Ensure that an item you are trying to add is assigned to a correct product.

WHMCS Modules
WHMCS Translations
cPanel Modules
Magento Extensions
Magento Themes
PrestaShop Modules
Blesta Extensions
Server Allocator For WHMCS