Testing WHMCS
This page details how to test a WHMCS installation before going live, then resetting it ready for production use.
Testing Modules
WHMCS shipped registrar and gateway modules come with, where possible, a test mode or the ability to use a test environment, that can be utilised to test transactions and domain orders. Referring to our documentation for the module being used will detail how test mode can be used. For example, with the eNom registrar module, this is detailed here: https://docs.whmcs.com/Enom#Test_Mode
An example of enabling test mode in the eNom module can be seen here:
When testing provisioning modules, there is no test mode required, however, it is advisable that all actions be reversed, as not only does this tidy things up, it tests that actions as well. An example of this would be provisioning a cPanel account on a remote server, then using the Terminate module command button to remove it.
Disabling Outgoing Emails
When testing, it is desirable in most cases (unless the test is specific to receiving emails) to prevent WHMCS from sending emails. To achieve this, navigate to Configuration () > System Settings > Mail tab and toggle the Disable Email Sending option to "On".Disabling emails is a feature available in WHMCS 8.1 or above.
Placing Orders
Once you have configured your required modules in test mode, as detailed above, you will want to place test orders. To place test orders within the admin user interface, you will want to first create a client/account. Details on how to do this can be found in the Manually Adding a Client guide. It's also possible to add clients using the AddClient AddClient API for those with experience with PHP. Ensure that the relevant domain or product pricing is configured before proceeding with testing orders. More information on that can be found here:
https://docs.whmcs.com/Domain_Pricing https://docs.whmcs.com/Products_and_Services
Orders can then be placed admin side, as an example, these steps would be used to place an order for a domain registration:
- On the Client Summary page, click the "Add New Order" link in the "Actions" panel.
- The system will preselect the client. Fill out the rest of the form, beginning with choosing the payment gateway you want their future invoices to use.
- Select None from the Product/Service menu.
- Select Monthly from the Billing Cycle menu for the product section.
- Enter the domain in the Domain textbox and select "Register" as the Domain Registration Option
- Choose the number of years you want to invoice the client for at the time of renewal.