This tutorial is part of our WHMCS tutorials series.
In this tutorial I will show you how to create a manual backup of your WHMCS installation. There are many options for automated backups but sometimes it's nice to make a manual backup for some nice reassurance. It is always recommend to generate a backup of WHMCS prior to upgrading or making other big changes such as installing a 3rd party module. That way if anything goes wrong you can restore your WHMCS safely.
A WHMCS installation comprises of two parts, a database and files. The database stores your data including client information, products/services, settings & more. The files contain WHMCS functions, templates, modules and more. To create a usable backup of WHMCS you will need to store both the files and database.
Let's start with backing up your database.
You can find out which name your WHMCS database uses by heading to your WHMCS root files in file manager. Open your configuration.php file to confirm with the database name string.
Your hosting provider should provide an option to mange your databases such as with the popular management tool, phpMyAdmin.
Using cPanel as example find phpMyAdmin, select your WHMCS database from the left column then click on the export button. Leave both settings default and then click on the go button to download a copy of your database.
To backup your WHMCS files you could use an FTP client, however the process is much easier using file manager of cPanel. First access file manager and head to parent directory of WHMCS. For example if your WHMCS is installed in a directory your parent will be public_html.
Right click on the directory that contains your WHMCS files and select the compress option.
I recommend using ZIP for the compression type.
By default file manager will create the ZIP within public_html. It is extremely important not to leave the zip of your WHMCS files here as it would then be publicly accessible, leaving your WHMCS vulnerable. Instead set the path to use the home directory. Files within the home directory cannot be accessed publicly.
Your home directory path will be displayed at the top of the left column in File Manager. Type this path followed by the name you'd like to use for the ZIP file.
Visit the home directory by clicking on the directory in the top left and then find your ZIP file, right click and download.
You now have a backup of both your WHMCS database and files which you can store locally or however you choose.
Notes
- Your database will be modified every time someone takes an action within WHMCS. For example a user creates an order, submits a ticket, makes a payment etc. Your files will only be modified when WHMCS is updated, a template or module is installed or a file is stored such as a ticket attachment or download. For this reason you may choose to backup your files only before and after making these changes while continuing to backup your database frequently.
- WHMCS does have an automated backup option. When enabled a backup of your WHMCS database will be automatically generated and stored based on your preferences. We recommend enabling this feature but It's important to note that this will not backup your WHMCS files.
- Your hosting provider may generate a backup of your web hosting account which will generally include all files and databases. You can also generate a full cPanel backup to achieve the same.
Request Support
We hope you found this documentation useful. If you run into any issues we will be happy to assist you.