cPanel / WHM Automatic Setup

If your server has cPanel or WHM, follow this guide for the easiest setup path. The module integrates directly with cPanel for automatic provisioning.

If your hosting uses cPanel or WHM (Web Host Manager), you're in luck β€” the SaaS module can automatically create cPanel accounts, databases, and subdomains for each tenant. This is the easiest and most hands-off setup available.

circle-info

What is cPanel? cPanel is a web hosting control panel that many hosting providers use. If you log in to your hosting and see a dashboard with icons like "MySQL Databases," "File Manager," "Email Accounts," etc., you're using cPanel. WHM is the reseller/admin version of cPanel.

When to Use This Guide

Use this guide if:

  • βœ… Your server has cPanel or WHM installed

  • βœ… You want the simplest possible setup

  • βœ… You want automatic database creation for tenants

  • βœ… You want automatic subdomain configuration

If you don't have cPanel, use the Manual Server Setup guide instead.


Step 1: Tell the Module You Have cPanel

  1. Go to SaaS Management β†’ SuperAdmin Settings

  2. Click the MySQL Server Settings tab

  3. For "I have cPanel", select Yes

  4. Click Save Settings

cPanel option in SaaS Settings
Select "Yes" for "I have cPanel" to enable automatic cPanel integration

Step 2: Configure MySQL Credentials

Still on the MySQL Server Settings tab:

Field
What to Enter

MySQL Host

localhost (usually)

MySQL Port

3306 (default)

MySQL Root Username

Your cPanel username OR a MySQL user with full privileges

MySQL Password

The corresponding password

circle-exclamation

Step 3: Verify the Connection

  1. Click "Click here to verify server settings"

  2. You should see a success message confirming the connection works

  3. Click Save Settings

If verification fails:

  • Make sure your MySQL username and password are correct

  • Check if the MySQL user has ALL PRIVILEGES (go to cPanel β†’ MySQL Databases β†’ User Privileges)

  • If using WHM, make sure the MySQL user is created at the WHM level

Step 4: Configure Your Domain in cPanel

For subdomain mode, you need to add a wildcard subdomain in cPanel:

  1. Log in to cPanel

  2. Go to Domains (or "Subdomains" in older cPanel versions)

  3. Add a new subdomain with * as the subdomain name

  4. Point it to the same directory as your main Perfex CRM installation

  5. Save

For subdirectory mode, no additional cPanel configuration is needed.

Step 5: Test the Setup

  1. Go back to your Perfex CRM admin panel

  2. Navigate to SaaS Management β†’ Plans

  3. Make sure you have at least one plan created

  4. Visit your landing page URL

  5. Try registering a test tenant

  6. If the tenant is created successfully with their own database β€” everything is working!


How cPanel Auto-Provisioning Works

Here's what happens behind the scenes when a tenant signs up:

You don't need to do anything manually β€” it's all automatic!


cPanel vs WHM: What's the Difference?

Feature
cPanel
WHM

Who uses it

Individual account holders

Server administrators / Resellers

Database creation

Creates databases under your account

Can create databases under any account

Best for

Single-server setups

Large-scale, multi-server deployments

Our module supports

βœ… Yes

βœ… Yes

circle-check

Last updated