How to Install WHMCS โ
WHMCS is the billing and client management platform used by most hosting resellers. This guide covers installing it on a cPanel account on your RemarkableCloud server.
Prerequisites โ
- A cPanel account with at least 2 GB disk space and PHP 8.1+
- A WHMCS license (purchase at whmcs.com)
- MySQL 8.0+ (available on all Cloud Cubes)
- ionCube loader installed (required by WHMCS โ pre-installed on RemarkableCloud)
- A domain pointed at your server for the billing portal
Installation โ
- Download the WHMCS installer from your WHMCS client area.
- Upload the
whmcsinstall.phpfile to your cPanel account'spublic_html(or a subdirectory likepublic_html/billing). - Create a MySQL database and user in cPanel: Databases โ MySQL Databases โ Create Database, then create a user and add them to the database with All Privileges.
- Visit
https://yourdomain.com/whmcsinstall.phpin your browser. - Follow the installer โ enter your license key, database credentials, and admin account details.
- The installer creates the database tables, writes the config file (
configuration.php), and creates your admin account. - Delete
whmcsinstall.phpafter installation completes.
Install in a subdirectory
Install WHMCS in a subdirectory like public_html/billing rather than the document root. This keeps your main site and billing portal separate, making it easier to manage both independently. Post-installation checklist โ
- Set up cron job โ WHMCS requires a cron job to run every 5 minutes. In cPanel: Advanced โ Cron Jobs โ add:
php -q /home/user/public_html/billing/crons/cron.phpSet frequency to every 5 minutes. - Secure the admin directory โ rename the
/adminfolder to something unique and update the path inconfiguration.phpunder$adminpath. - Configure payment gateway โ go to Setup โ Payments โ Payment Gateways and connect Stripe, PayPal, or your preferred processor.
- Set your company details โ go to Setup โ General Settings and fill in your company name, logo, email addresses, and base currency.
- Connect email โ go to Setup โ General Settings โ Mail and configure SMTP (use your server's mail or an external SMTP like SendGrid).
Securing WHMCS โ
bash
# Set correct ownership
chown -R cpanelusername:cpanelusername /home/cpanelusername/public_html/billing
# Protect configuration.php
chmod 400 /home/cpanelusername/public_html/billing/configuration.php
# Protect the templates_c directory
chmod 777 /home/cpanelusername/public_html/billing/templates_cAdd to your WHMCS .htaccess:
apache
# Block direct access to sensitive files
<FilesMatch "\.(php|php3|php4|php5|phtml|pl|py|jsp|asp|aspx|cgi|sh|tar|gz|bz2|zip|sql)$">
Order Allow,Deny
Deny from all
</FilesMatch>
