WHMCS is the billing and automation platform most hosting resellers use to sell plans, take payments and create cPanel accounts automatically. It installs like a normal PHP application on a cPanel account. This guide walks through a clean, secure installation. MdmHost's top Master Reseller plan includes a free WHMCS licence.
Before you start
- A WHMCS licence key (from WHMCS or your provider).
- A cPanel account with a domain or subdomain for the billing area, for example
billing.example.com, secured with SSL. - PHP 8.1 or newer supported by your WHMCS version (check the WHMCS system requirements for the exact release), with the
ionCube Loader,curl,gd,json,mbstring,pdo_mysql,xmlandzipextensions. - The WHMCS ZIP downloaded from your WHMCS client area.
Prepare PHP
- In cPanel, open Software → MultiPHP Manager (or Select PHP Version on CloudLinux) and choose a PHP version supported by your WHMCS release.
- On CloudLinux, tick ioncube_loader in the extensions list. See install PHP extensions in cPanel.
- Set
memory_limitto at least 128M (256M recommended).
Create the database
- Open Databases → Manage My Databases (or the Database Wizard).
- Create a database, for example
user_whmcs. - Create a user with a strong password and add it to the database with ALL PRIVILEGES.
- Note the database name, user and password.
Upload the files
- Open Files → File Manager and go to the billing domain's document root.
- Upload the WHMCS ZIP and extract it. Move the contents of the extracted
whmcsfolder into the document root. - Rename
configuration.php.newtoconfiguration.php.
Run the installer
- Visit
https://billing.example.com/install/install.php. - Accept the licence agreement. The installer checks requirements; fix any red items.
- Enter the licence key and the database details (host
localhost). - Create the first administrator account with a unique user name (not
admin) and a strong password. - Finish the installation and delete the
installfolder with the File Manager.
Secure the installation
- Set
configuration.phppermissions to400or440. - Move the
attachments,downloadsandtemplates_cfolders outside the web root (for example/home/user/whmcs_data/) and update their paths under Configuration → System Settings → Storage Settings and inconfiguration.php. - Rename the
adminfolder and set$customadminpathinconfiguration.php. - Move
cronsoutside the web root and point to it withcrons/config.php.
More hardening steps are in the WHMCS security hardening checklist.
Add the cron job
In cPanel open Advanced → Cron Jobs and add a job every 5 minutes:
php -q /home/user/whmcs_data/crons/cron.phpUse the PHP binary for your version if needed. WHMCS shows the exact command under Configuration → System Settings → Automation Settings.
Troubleshooting
- "Site error: the file requires the ionCube PHP Loader": ionCube is not enabled for the selected PHP version.
- Licence invalid: the domain, IP or directory differs from the licence. Reissue the licence in your WHMCS client area.
- Blank page: check
error_login the folder for PHP version or memory errors.
