cPanel

The BaseKit cPanel plugin allows hosting companies to offer BaseKit website builder to their customers via cPanel. The plugin makes it easy to bundle BaseKit with hosting plans, and takes care of all the technical aspects of integration. This eliminates the need for development work and reduces the time to market.

How it works

The BaseKit cPanel plugin provides a simple UI to your users that will enable them to easily activate a BaseKit account and create and manage one or more websites.

The cPanel plugin talks to a BaseKit environment via the API. You configure the plugin by providing the API URL and credentials of the environment on which your users’ sites will be created and edited.

Commercial model

The BaseKit cPanel plugin does not include any billing functionality. It is intended that a BaseKit website will be bundled with a paid hosting package represented by a cPanel plan. This user may be billed via WHMCS or any other similar platform, but this sits outside of the scope of this plugin.

The cPanel plugin is designed to provision BaseKit packages that correspond to cPanel plans; when a user activates BaseKit, the package provisioned will mirror the cPanel plan.

Features

Activation

By clicking the Activate button, a new BaseKit user account and site is provisioned. A default domain is mapped to the site with the following format:

[cPanel username]­[timestamp].[brand­domain]

For example, for cPanel username basekit and brand domain brand­domain.com the default domain would be basekit­201501051351.brand­domain.com.

Sites list

If a user has already activated, they will see a list of their BaseKit sites. Next to each site there are three options:

Manage sites

There are two major functions that can be performed here:

Domain Mapping

Users can point any of their cPanel-managed domains to a BaseKit site with a single click. The domain’s DNS records are automatically created and the domain should be immediately ready to be used.

Site Status

If the user has already published their BaseKit site then they can toggle it online and offline by clicking the button.

Installation

Note that the following commands assume the x3 theme. To install the plugin for a different theme, replace any occurrence of x3 with the name of the new theme. For example, for the Paper Lantern theme, replace with paper_lantern.

To install the plugin on a WHM server, download the latest version of the cPanel plugin, copy it to the server, and then follow these steps:

tar ­xzvf basekit-cpanel-plugin-latest.tar.gz cd cpanel
chmod +x install.sh ./install.sh
cat lang/english >> /usr/local/cpanel/base/frontend/x3/lang/english service cpanel restart

You should now have the cPanel plugin installed and accessible via WHM. The next step is to configure it so that it is linked to your BaseKit environment.

Log in to WHM as the root user and go to the BaseKit Configuration page in the Plugins section. You will need to fill in all of the fields. If you don’t know what you should enter here then please contact partners@basekit.com.

Package mapping

The WHM configuration includes one BaseKit package reference, and this is the package that will be provisioned when a user activates BaseKit from cPanel.

To support multiple BaseKit packages, where each cPanel plan is associated to a BaseKit package, you will need to provide the mappings in JSON format. The file should be called map.json and reside at /usr/local/cpanel/base/frontend/x3/basekit.

The format of the file is as follows:

{
    "cpanel_plan_1": 123,
    "cpanel_plan_2": 456
}

The left hand strings should be the cPanel plan names. You can find these in WHM. The right hand numbers are the BaseKit package references corresponding with the cPanel plan names.

In the above example, users on the cPanel plan named cpanel_plan_1 will be provisioned with the BaseKit package reference 123, and users on the cPanel plan named cpanel_plan_2 will be provisioned with the BaseKit package reference 456.

Need help?

Our teams are always on hand to assist you. For commercial enquires contact partners@basekit.com, and for technical questions integrations@basekit.com.