A WHMCS staging copy can contain real customers, saved payment references and server credentials. Isolate those capabilities before running tests so the copy cannot send customer emails, collect money or change production services.
IN THIS ARTICLE
01 Create an isolated copy
- Obtain an appropriate development licence and confirm its access conditions. Protect the test address with authentication or a network restriction.
- Create a separate file location and separate database. Copy the production files and a controlled database backup into them.
- Update the staging
configuration.phpto point only to the staging database and private storage locations. - Set the staging WHMCS System URL to its own HTTPS address.
- Enable Disable Email Sending or configure a controlled test mail sink before triggering application activity.
- Replace live gateway and registrar connections with supported test credentials, and disconnect production provisioning servers.
- Keep staging cron disabled until its outgoing integrations and test data have been reviewed.
02 Check hidden shared dependencies
Inspect absolute paths for attachments, downloads, templates and cron scripts. A copied configuration can still point at production storage. Also review remote storage, notification services, webhooks, addon API keys and custom scheduled jobs.
Use clearly labelled test products and disposable hosting accounts. A gateway's test mode does not put a separate registrar or server module into test mode. Verify each integration independently and do not use a real customer's service as the target of a provisioning test.
03 Run representative tests
Exercise customer and administrator sign-in, checkout, invoice generation, a supported test payment, provisioning, ticket submission and scheduled tasks. Record expected results before starting so an unexpected email or account action is easy to identify.
For an upgrade, compare behaviour before and after the change using the same test cases. Inspect System Health, logs and automation reports, and verify customised templates and third-party modules.
04 Protect the copied data
Limit access to the team performing the test and avoid sharing unnecessary customer information with external tools. Keep the original encryption configuration available for a legitimate recovery, but never substitute staging configuration back into production without a reviewed deployment plan.
Common questions
Can I run the production cron on the copied database?
Only after you have isolated every action it can trigger and created a controlled test schedule. Otherwise it may attempt overdue invoicing, suspension, renewal or messages using copied live records.
Should I delete test records with a database cleanup script?
Use a known isolated staging snapshot or a deliberate rebuild. A script intended to clear a test system can destroy a live billing history if used against the wrong database. Confirm the environment and backup before any reset.
Record which integrations used a provider sandbox, which used a disposable real resource and which remained disconnected. This makes the test result precise: an isolated checkout can validate local invoice behaviour without proving that an untested production registrar connection will complete a domain order.
05 Approve production separately
Keep the successful test record, exact software versions and remaining limitations with the change plan. Staging success supports deployment but does not replace a production backup or a check of the real server environment. After the live change, repeat a small set of safe acceptance checks and confirm that only the production scheduler owns real billing activity.