Prerequisites:
- Shared Hosting Account: Ensure you have access to a shared hosting account with cPanel.
- WHMCS License: Purchase a WHMCS license from the official website.
- FTP Client: Have an FTP client ready for file transfer.
Step 1: Download WHMCS
- Log in to your WHMCS account and download the latest version of WHMCS.
- Extract the downloaded ZIP file on your local machine.
Step 2: Upload Files to Server
- Open your FTP client and connect to your shared hosting account.
- Navigate to the
public_html
directory. - Upload the extracted WHMCS files to the
public_html
directory.
Step 3: Create a Database
- Log in to cPanel.
- Navigate to the “MySQL Database Wizard.”
- Create a new database, a database user, and associate the user with the database. Note down the database name, username, and password.
Step 4: Configure Configuration File
- In the
configuration.php.new
file (found in the WHMCS root directory), rename it toconfiguration.php
. - Open
configuration.php
in a text editor and add your database details:
$db_host = 'localhost';
$db_port = '3306';
$db_username = 'your_db_username';
$db_password = 'your_db_password';
$db_name = 'your_db_name';
Replace placeholders with your actual database information.
Step 5: Set Permissions
- Ensure that the following directories have correct permissions (755 for directories and 644 for files):
attachments/
downloads/
templates_c/
configuration.php
Step 6: Install WHMCS
- Open your web browser and navigate to your WHMCS installation URL (e.g.,
http://yourdomain.com
). - Follow the on-screen instructions to complete the installation.
Step 7: Post-Installation Configuration
- Remove the
install
directory from your WHMCS installation for security reasons. - Log in to the WHMCS admin panel using the provided credentials.
- Configure your payment gateways, email settings, and other preferences.
Step 8: Set Up Cron Jobs
- In cPanel, navigate to “Cron Jobs.”
- Set up a cron job to run the WHMCS cron file (
cron.php
) at regular intervals.
php -q /home/username/public_html/cron.php
Replace /home/username/public_html/
with the actual path to your WHMCS installation.
Conclusion:
Congratulations! You’ve successfully installed WHMCS on your shared hosting account. Ensure you regularly update WHMCS to the latest version for security and feature enhancements.