{"id":10915,"date":"2025-01-17T07:12:20","date_gmt":"2025-01-17T07:12:20","guid":{"rendered":"https:\/\/www.trustedhosting.in\/blog\/?p=10915"},"modified":"2025-01-17T07:12:20","modified_gmt":"2025-01-17T07:12:20","slug":"setting-development-testing-environment","status":"publish","type":"post","link":"https:\/\/www.webystrata.com\/blog\/setting-development-testing-environment\/","title":{"rendered":"How to Setup a Development and Testing Environment in WHMCS"},"content":{"rendered":"<figure id=\"attachment_10917\" aria-describedby=\"caption-attachment-10917\" style=\"width: 2560px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/www.trustedhosting.in\/cpanel-hosting.html\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-10917 size-full\" title=\"How to Setup a Development and Testing Environment in WHMCS\" src=\"https:\/\/www.trustedhosting.in\/blog\/wp-content\/uploads\/2025\/01\/5685556_54770-1-scaled.jpg\" alt=\"How to Setup a Development and Testing Environment in WHMCS\" width=\"2560\" height=\"2230\" srcset=\"https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2025\/01\/5685556_54770-1-scaled.jpg 2560w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2025\/01\/5685556_54770-1-300x261.jpg 300w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2025\/01\/5685556_54770-1-1024x892.jpg 1024w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2025\/01\/5685556_54770-1-768x669.jpg 768w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2025\/01\/5685556_54770-1-1536x1338.jpg 1536w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2025\/01\/5685556_54770-1-2048x1784.jpg 2048w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><\/a><figcaption id=\"caption-attachment-10917\" class=\"wp-caption-text\">\u00a0<\/figcaption><\/figure>\n<h1>How to Setup a Development and Testing Environment in WHMCS<\/h1>\n<div class=\"article__content screensteps-article-content\" data-controller=\"article photoswipe\" data-article-id=\"1343495\" data-article-type-id=\"0\" data-space-id=\"16847\" data-manual-id=\"64753\" data-workflow=\"false\" data-article-rewrite-links-value=\"true\" data-article-base-path-value=\"\/\" data-photoswipe-article-id-value=\"1343495\" data-article-author-action-outlet=\".nav__item\">\n<div class=\"screensteps-steps\" data-role=\"steps-container\">\n<div class=\"instructions screensteps-textblock\" tabindex=\"0\">\n<div id=\"text-content_bdb036db-0b80-4b1a-8433-c62c3c5d1ed8\" class=\"text-block-content\">\n<p>Creating a testing and development environment will let you verify all of your customizations without any changes to your production system. This helps to protect your data and customizations.<\/p>\n<p>We recommend setting this up before you upgrade WHMCS and whenever you write modules, themes, or other customizations.<\/p>\n<\/div>\n<\/div>\n<div class=\"instructions screensteps-textblock screensteps-wrapper--info screensteps-wrapper\" tabindex=\"0\" role=\"status\" aria-label=\"info\">\n<div id=\"text-content_68557808-cc22-4a22-8530-b520b0d919ef\" class=\"text-block-content\">\n<p>Make sure to also perform basic steps like creating\u00a0a\u00a0<a href=\"https:\/\/docs.whmcs.com\/Maintenance#Backing_up_your_WHMCS_Database\" target=\"_blank\" rel=\"noopener\">full backup<\/a>\u00a0and checking our release notes for changes before upgrading.<\/p>\n<\/div>\n<\/div>\n<div class=\"step step-depth-1\" data-step-uuid=\"ee59b643-0c2f-4cf0-8281-81bd18f43a9f\">\n<h2 id=\"1-get-a-development-license\" tabindex=\"0\">1. Get a Development License<\/h2>\n<div class=\"instructions screensteps-textblock\" tabindex=\"0\">\n<div id=\"text-content_8dd87196-3c85-453b-b71e-925edf3bacda\" class=\"text-block-content\">\n<p>Contact\u00a0<a href=\"https:\/\/www.whmcs.com\/submit-a-ticket\" target=\"_blank\" rel=\"noopener\">WHMCS Customer Service<\/a>\u00a0to get a development license.<\/p>\n<ul>\n<li>You can get one free development license for every active license that you purchase directly from whmcs.com.<\/li>\n<li>If you purchase your WHMCS license through a reseller, you will need to\u00a0<a href=\"https:\/\/www.whmcs.com\/members\/knowledgebase.php?action=displayarticle&amp;id=78\" target=\"_blank\" rel=\"noopener\">buy the development license<\/a>.<\/li>\n<\/ul>\n<p>The addons for your paid license will be available in your test installation, with the exception of Live Chat. Installations using this type of license must be private and must return a\u00a0<code>Forbidden<\/code>\u00a0error or login prompt if accessed.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"step step-depth-1\" data-step-uuid=\"94bfb012-8ec1-480f-896d-7eb2a03ed2ec\">\n<h2 id=\"2-meet-the-system-requirements\" tabindex=\"0\">2. Meet the System Requirements<\/h2>\n<div class=\"instructions screensteps-textblock\" tabindex=\"0\">\n<div id=\"text-content_564f6970-9313-4f7b-9317-a7f69824198f\" class=\"text-block-content\">\n<p>Your testing and development environment should meet the same\u00a0<a href=\"https:\/\/docs.whmcs.com\/System_Requirements\" target=\"_blank\" rel=\"noopener\">system requirements<\/a>\u00a0as a production installation.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"step step-depth-1\" data-step-uuid=\"e90ae315-e62a-4e4b-8d15-29bbbcb71b83\">\n<h2 id=\"3-duplicate-your-whmcs-installation\" tabindex=\"0\">3. Duplicate your WHMCS Installation<\/h2>\n<div class=\"instructions screensteps-textblock screensteps-wrapper--warning screensteps-wrapper\" tabindex=\"0\" role=\"status\" aria-label=\"warning\">\n<div id=\"text-content_e27b3908-c2d3-4f7d-b96b-38dc6c7bd5ee\" class=\"text-block-content\">\n<p>For the most accurate results, your installation should be identical to your production setup, with the same data and configuration.<\/p>\n<\/div>\n<\/div>\n<div class=\"instructions screensteps-textblock\" tabindex=\"0\">\n<div id=\"text-content_f43e969e-88e9-41c4-a960-1e714368afe9\" class=\"text-block-content\">\n<p>There are several methods to duplicate your installation. The method that you use will depend on many factors, including the hosting control panel you use.<\/p>\n<p>If you&#8217;re using cPanel, copy your WHMCS installation in the\u00a0<a href=\"https:\/\/docs.cpanel.net\/cpanel\/files\/file-manager\/\" target=\"_blank\" rel=\"noopener\"><strong>File Manager<\/strong><\/a>\u00a0interface:<\/p>\n<ol>\n<li>Log in to cPanel and go to\u00a0<strong>Files &gt;&gt; File Manager<\/strong>.<\/li>\n<li>Select the folder for your production installation.<\/li>\n<li>Click\u00a0<strong>Copy<\/strong>.<\/li>\n<li>Enter the new location (the location of your development installation).<\/li>\n<li>Edit the\u00a0<code>configuration.php<\/code>\u00a0file in your development environment to reflect the new location.<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"step step-depth-1\" data-step-uuid=\"553d687d-e9c6-48a2-bf48-a0d5b28ba7b7\">\n<h2 id=\"4-duplicate-your-database\" tabindex=\"0\">4. Duplicate your Database<\/h2>\n<div class=\"instructions screensteps-textblock\" tabindex=\"0\">\n<div id=\"text-content_c044fa90-9cb3-43f9-9b1e-add791f6c3c8\" class=\"text-block-content\">\n<p>You must also duplicate the data that WHMCS operates on. This means creating a second database, exporting the existing database, and then importing it to your new database. Like duplicating the installation, there are several ways to do this that partially depend on the hosting control panel you use.<\/p>\n<p>If you&#8217;re using cPanel, you could follow this process:<\/p>\n<ol>\n<li>Use the\u00a0<strong>MySQL Databases\u00a0<\/strong>interface to\u00a0<a href=\"https:\/\/docs.cpanel.net\/cpanel\/databases\/mysql-databases\/#create-a-database\" target=\"_blank\" rel=\"noopener\">create the new database<\/a>.<\/li>\n<li>Use\u00a0<strong>phpMyAdmin\u00a0<\/strong>to export the existing data and\u00a0<a href=\"https:\/\/docs.whmcs.com\/Maintenance#Restoring_a_Database_Backup\" target=\"_blank\" rel=\"noopener\">import it into your new database<\/a>.<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"step step-depth-1\" data-step-uuid=\"afaca157-d923-455a-a2e6-1e922527ff7e\">\n<h2 id=\"5-password-protect-your-installation-s-directory\" tabindex=\"0\">5. Password Protect your Installation&#8217;s Directory<\/h2>\n<div class=\"instructions screensteps-textblock\" tabindex=\"0\">\n<div id=\"text-content_fda7fdf8-a3b0-4ffe-8e54-f77b9113bec4\" class=\"text-block-content\">\n<p>The development license requires you to make the development installation inaccessible, either using password protection or other methods that return an error or a login prompt.<\/p>\n<p>In cPanel, you can password protect the installation&#8217;s directory in\u00a0<strong>Files &gt;&gt;\u00a0<\/strong><a href=\"https:\/\/docs.cpanel.net\/cpanel\/files\/directory-privacy\/\" target=\"_blank\" rel=\"noopener\"><strong>Directory Privacy<\/strong><\/a>.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"step step-depth-1\" data-step-uuid=\"69ca931e-e680-4b63-beee-a21063753c9f\">\n<h2 id=\"6-update-the-system-url\" tabindex=\"0\">6. Update the System URL<\/h2>\n<div class=\"instructions screensteps-textblock\" tabindex=\"0\">\n<div id=\"text-content_e5bd5f4a-b317-443a-a76d-bf943c77396b\" class=\"text-block-content\">\n<p>Make sure to update the system URL in the\u00a0<strong>General\u00a0<\/strong>tab at\u00a0<strong>Configuration &gt; System Settings &gt;\u00a0<\/strong><a href=\"https:\/\/docs.whmcs.com\/General_Tab\" target=\"_blank\" rel=\"noopener\"><strong>General Settings<\/strong><\/a>\u00a0to use the new testing environment&#8217;s URL.<\/p>\n<p>If you can&#8217;t access the installation to do this in the interface yet, in WHMCS 8.8 and later, you can set the\u00a0<code>systemUrl<\/code>\u00a0setting in the\u00a0<code>configuration.php<\/code>\u00a0file:<\/p>\n<\/div>\n<\/div>\n<div class=\"code-block copy-clipboard--parent\">\n<pre id=\"code-content_0bb2669e-f596-452f-9bc8-1d981ce3b696\" tabindex=\"0\"><code>$systemUrl=\"https:\/\/www.example.com\/whmcs\/\"<\/code><\/pre>\n<div class=\"copy-clipboard copy-clipboard--tt-right\"><\/div>\n<\/div>\n<div class=\"instructions screensteps-textblock\" tabindex=\"0\">\n<div id=\"text-content_0fad5b50-7f51-41f9-a332-4334688f56af\" class=\"text-block-content\">\n<p>In WHMCS 8.7 and earlier, you can use this MySQL command or update the value manually in phpMyAdmin:<\/p>\n<\/div>\n<\/div>\n<div class=\"code-block copy-clipboard--parent\">\n<pre id=\"code-content_5606c231-819c-409c-af37-8b39df2d8ae6\" tabindex=\"0\"><code>UPDATE `tblconfiguration` SET value ='https:\/\/www.example.com\/whmcs\/' WHERE setting='SystemURL';<\/code><\/pre>\n<div class=\"copy-clipboard copy-clipboard--tt-right\"><\/div>\n<\/div>\n<\/div>\n<div class=\"step step-depth-1\" data-step-uuid=\"4fcb560a-1916-4b50-bc6a-46dd543ee9ee\">\n<h2 id=\"7-prevent-sending-mail\" tabindex=\"0\">7. Prevent Sending Mail<\/h2>\n<div class=\"instructions screensteps-textblock\" tabindex=\"0\">\n<div id=\"text-content_bbc13170-a6ec-44e2-a4d8-915e0b32b221\" class=\"text-block-content\">\n<p>To prevent sending test mail from your development installation to your real customers:<\/p>\n<ol>\n<li>Go to\u00a0<strong>Configuration &gt; System Settings &gt; General Settings<\/strong>.<\/li>\n<li>In the\u00a0<strong>General\u00a0<\/strong>tab, set\u00a0<strong>Disable Email Sending\u00a0<\/strong>to\u00a0<strong>ON<\/strong>.<\/li>\n<\/ol>\n<p>You can also use a service like\u00a0<a href=\"https:\/\/mailtrap.io\/\" target=\"_blank\" rel=\"noopener\">Mailtrap.io<\/a>\u00a0to serve this purpose.<\/p>\n<p>You may also want to set your payment gateways and domain registrars to test mode and disconnect from your production servers. You can also prevent accidentally charging customers by adding extra characters to the encryption hash in your development environment&#8217;s\u00a0<code>configuration.php<\/code>\u00a0file. This makes WHMCS unable to read encrypted data, ensuring that it can&#8217;t use encrypted data to charge credit cards or perform other actions.<\/p>\n<p>You must exercise caution when you do this. Accidentally making this type of change on your production installation could cause\u00a0<strong>serious<\/strong>\u00a0problems.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"step step-depth-1\" data-step-uuid=\"b50cc391-ee86-4488-b6dc-cce304fcf3fa\">\n<h2 id=\"testing-a-new-version\" tabindex=\"0\">Testing a New Version<\/h2>\n<div class=\"instructions screensteps-textblock\" tabindex=\"0\">\n<div id=\"text-content_0eda9853-646f-4804-b0a9-5a274372580b\" class=\"text-block-content\">\n<p>After you copy your production installation and have confirmed that everything is functional, you can upgrade WHMCS. We recommend that you use the\u00a0<a href=\"https:\/\/docs.whmcs.com\/Automatic_Updater\" target=\"_blank\" rel=\"noopener\">Automatic Updater<\/a>\u00a0for this, since it streamlines the process for you.<\/p>\n<p>After upgrade, go through WHMCS and exercise all of the features and functions that you use most. Check both the Client Area and Admin Area, and make sure to place several orders for your various products. Advance these test orders through every step of the process, including marking them as paid and ensuring correct provisioning.<\/p>\n<p>Monitor\u00a0<strong>Configuration &gt; System Health\u00a0<\/strong>and look for any problems or incompatibilities. The\u00a0<strong>Cron Job Activity Report\u00a0<\/strong>email will confirm whether your automation tasks are successful.<\/p>\n<p>After you have completed everything successfully, you can upgrade your production installation.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"screensteps-next-prev-navigation\" data-role=\"next-previous-nav\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>How to Setup a Development and Testing Environment in WHMCS Creating a testing and development environment will let you verify&hellip;<\/p>\n","protected":false},"author":1,"featured_media":10917,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-10915","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-whmcs"],"_links":{"self":[{"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/posts\/10915","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/comments?post=10915"}],"version-history":[{"count":1,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/posts\/10915\/revisions"}],"predecessor-version":[{"id":10918,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/posts\/10915\/revisions\/10918"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/media\/10917"}],"wp:attachment":[{"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/media?parent=10915"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/categories?post=10915"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/tags?post=10915"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}