WHMCS

Install WHMCS on cPanel hosting (step by step)

Install WHMCS on a cPanel account: check requirements, enable ionCube, create the database, upload files, run the installer, secure the folders and set up the cron.

IntermediateWHMCS3 min read

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, xml and zip extensions.
  • The WHMCS ZIP downloaded from your WHMCS client area.

Prepare PHP

  1. In cPanel, open Software → MultiPHP Manager (or Select PHP Version on CloudLinux) and choose a PHP version supported by your WHMCS release.
  2. On CloudLinux, tick ioncube_loader in the extensions list. See install PHP extensions in cPanel.
  3. Set memory_limit to at least 128M (256M recommended).

Create the database

  1. Open Databases → Manage My Databases (or the Database Wizard).
  2. Create a database, for example user_whmcs.
  3. Create a user with a strong password and add it to the database with ALL PRIVILEGES.
  4. Note the database name, user and password.

Upload the files

  1. Open Files → File Manager and go to the billing domain's document root.
  2. Upload the WHMCS ZIP and extract it. Move the contents of the extracted whmcs folder into the document root.
  3. Rename configuration.php.new to configuration.php.

Run the installer

  1. Visit https://billing.example.com/install/install.php.
  2. Accept the licence agreement. The installer checks requirements; fix any red items.
  3. Enter the licence key and the database details (host localhost).
  4. Create the first administrator account with a unique user name (not admin) and a strong password.
  5. Finish the installation and delete the install folder with the File Manager.

Secure the installation

  • Set configuration.php permissions to 400 or 440.
  • Move the attachments, downloads and templates_c folders outside the web root (for example /home/user/whmcs_data/) and update their paths under Configuration → System Settings → Storage Settings and in configuration.php.
  • Rename the admin folder and set $customadminpath in configuration.php.
  • Move crons outside the web root and point to it with crons/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.php

Use 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_log in the folder for PHP version or memory errors.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.