WHMCS, which in full stands for Web Host Manager Complete Solution, is a widely adopted web-based platform for hosting management. It is also bundled with billing functions and it enables you to automate the aspects of any hosting business. WHMCS has dozens of plugins for hosting providers and resellers making it easier to manage clients, support, and your billing processes.

Here are key features of WHMCS hosting platform:

  • Domain Management functions: WHCMS has complete domain management functions.
  • Integration with Control Panels: Easily integrate with hosting panels such as DirectAdmin, cPanel, Plesk, and many others.
  • It is modular and highly customizable: You can improve WHCMS functionalities using available modules and add-ons
  • WHMCS has billing automation: automated sending of invoices and collection of payments
  • Integrated Support feature: Support clients from WHMCS by allowing them create support tickets
  • It is secure by design: WHMCS is build to be secure from attacks and fraudster.
  • Provides API for Developers: As a Developer you get API access for customizations and adding feature extensions.

For users running Rocky Linux / AlmaLinux 8, check:

Follow the steps provided in this brief article to have a working installation of WHMCS on an Ubuntu 22.04|20.04 Linux system.

Install PHP and Apache Web server

Update your system APT index before performing any package installation.

sudo apt update

Then install PHP and other required packages.

sudo apt install php
sudo apt install php-{bcmath,xml,mysql,zip,intl,ldap,gd,cli,bz2,curl,mbstring,pgsql,opcache,soap,cgi}

Next install Apache web server and its PHP module.

sudo apt install apache2 libapache2-mod-php

Enable PHP extension for Apache.

sudo a2enmod php*

Install PHP IonCube Loader

IonCube loader is required for the decoding of encrypted PHP files. This is required during WHMCS installation. IonCube Loader is not available on OS packages and we need to install it manually for specific version of PHP on the system.

First check the version of PHP in the system.

### Ubuntu 22.04 ###
$ php -version
PHP 8.1.2-1ubuntu2.14 (cli) (built: Aug 18 2023 11:41:11) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
    with the ionCube PHP Loader v13.0.2, Copyright (c) 2002-2023, by ionCube Ltd.
    with Zend OPcache v8.1.2-1ubuntu2.14, Copyright (c), by Zend Technologies

### Ubuntu 20.04 ###
$ php -version
PHP 7.4.3-4ubuntu2.19 (cli) (built: Jun 27 2023 15:49:59) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.3-4ubuntu2.19, Copyright (c), by Zend Technologies

Install wget package used to download IonCube loader archive file.

sudo apt install wget

Now download IonCube loader into your local system.

wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz

Extract the package using tar

tar xvf ioncube_loaders_lin_x86-64.tar.gz

Locate the extension directory of the installed PHP version

 php -i | grep extension_dir

Copy and Configure IonCube Loader in PHP configuration files.

### Ubuntu 22.04 ###
sudo cp ioncube/ioncube_loader_lin_8.1.so /usr/lib/php/20210902
echo "zend_extension=/usr/lib/php/20210902/ioncube_loader_lin_8.1.so"|sudo tee -a /etc/php/8.1/cli/php.ini
echo "zend_extension=/usr/lib/php/20210902/ioncube_loader_lin_8.1.so"|sudo tee -a /etc/php/8.1/apache2/php.ini

### Ubuntu 20.04 ###
sudo cp ioncube/ioncube_loader_lin_7.4.so /usr/lib/php/20190902
echo "zend_extension=/usr/lib/php/20190902/ioncube_loader_lin_7.4.so"|sudo tee -a /etc/php/7.4/cli/php.ini
echo "zend_extension=/usr/lib/php/20190902/ioncube_loader_lin_7.4.so"|sudo tee -a /etc/php/7.4/apache2/php.ini

Restart Apache web server

sudo systemctl restart apache2

Install MariaDB database server

Install MariaDB database server in your Ubuntu system.

sudo apt install mariadb-server mariadb-client

Create database and its user for WHMCS

$ sudo mysql -u root
CREATE DATABASE whmcs;
GRANT ALL ON whmcs.* TO whmcs@localhost IDENTIFIED BY "StrongDBPassw0rd";
FLUSH PRIVILEGES;
QUIT;

Install and Configure WHMCS

Extract downloaded WHMCS archive.

unzip <Your-WHMCS-Package>.zip

Move the folder to /var/www/html directory.

sudo mv path/to/whmcs/folder /var/www/html

Rename the configuration.php.new to configuration.php.

sudo mv /var/www/html/whmcs/configuration.php.new /var/www/html/whmcs/configuration.php

The final code and all files should be on /var/www/html/whmcs

$ ls /var/www/html/whmcs
admin                 attachments        contact.php          domainchecker.php  init.php           modules               resources           templates_c      viewquote.php
affiliates.php        banned.php         creditcard.php       downloads          knowledgebase.php  networkissues.php     serverstatus.php    unsubscribe.php  viewticket.php
aff.php               cart.php           crons                downloads.php      lang               networkissuesrss.php  status              upgrade.php      whois.php
announcements.php     clientarea.php     dist.loghandler.php  feeds              link.php           oauth                 submitticket.php    vendor
announcementsrss.php  configuration.php  dl.php               includes           login.php          pwreset.php           supporttickets.php  viewemail.php
assets                configuressl.php   dologin.php          index.php          logout.php         register.php          templates           viewinvoice.php

Update directory permissions.

sudo chown -R www-data:www-data /var/www/html/whmcs/

Configure WHMCS from web console

Open your web browser and navigate to WHMCS installation script at http://www.example.com/whmcs/install/install.php to run the installation.

install whmcs ubuntu 01

Accept end user license agreement to continue with the installation.

install whmcs ubuntu 02

Begin WHCMS installation in your system.

install whmcs ubuntu 03

In the next step we configure database connection as per information used in MariaDB database installation.

Configure datab

  • Database name: whmcs
  • Database user: whmcs
  • Database password: StrongDBPassw0rd
install whmcs ubuntu 04

Complete the installation by creating first admin user for WHMCS administration

install whmcs ubuntu 05

You should see success message if all went as expected.

install whmcs ubuntu 06

Click “Go to Admin Area Now” link to access WHMCS admin portal.

install whmcs ubuntu 07

Login with admin username and password you just created.

install whmcs ubuntu 08

Next configure cron for WHMCS on the terminal.

$ sudo crontab -e
*/5 * * * * /usr/bin/php -q /var/www/html/whmcs/crons/cron.php

Delete installation script

sudo rm -r /var/www/html/whmcs/install

Update permissions configuration script file.

sudo chmod 0400 /var/www/html/whmcs/configuration.php

You can access WHMCS frontend on http://ServerIP/whmcs/ and direct admin dashboard is on http://ServerIP/whmcs/admin.

Conclusion

WHMCS was originally developed with functions suitable foe web hosting business, but it has evolved into a powerful solution fit for any kind of an online service provider solutions. WHMCS has a lot of integration options for domain registration, web hosting panels, gateways for payments, server management, and many other tools.

4 COMMENTS

  1. Hi! After continuing the installation, I tried to enter the administration page, but it tells me that the username and password are wrong. To confirm this, I performed the installation from scratch 2 or 3 times but I got the same result.

LEAVE A REPLY

Please enter your comment!
Please enter your name here