Difference between revisions of "Maximising Performance"

From WHMCS Documentation

(Software Related)
Line 5: Line 5:
 
*'''Disable Sidebar Stats''' — The system calculates sidebar stats in WHMCS on every page load. Normally, this is not an issue, but when your database becomes large it can take longer. To avoid that, disable the "'Sidebar Statistics'" admin role group permission in Setup > Administrator Roles for any roles you use. After you do this, the system won't calculate these stats. You can still obtain all the stats via the actual reports section.
 
*'''Disable Sidebar Stats''' — The system calculates sidebar stats in WHMCS on every page load. Normally, this is not an issue, but when your database becomes large it can take longer. To avoid that, disable the "'Sidebar Statistics'" admin role group permission in Setup > Administrator Roles for any roles you use. After you do this, the system won't calculate these stats. You can still obtain all the stats via the actual reports section.
 
*'''Disable Ticket Counts''' — When you have a lot of tickets, calculating the number of tickets per status to display each time you open a ticket can slow things down. To avoid that, disable the ticket counts by adding the following line to your WHMCS <tt>configuration.php</tt> file:<div class="source-cli">$disable_admin_ticket_page_counts = true;</div>
 
*'''Disable Ticket Counts''' — When you have a lot of tickets, calculating the number of tickets per status to display each time you open a ticket can slow things down. To avoid that, disable the ticket counts by adding the following line to your WHMCS <tt>configuration.php</tt> file:<div class="source-cli">$disable_admin_ticket_page_counts = true;</div>
*'''Logging''' — In WHMCS, you can enable logging for, for example, SQL errors, hooks loading, or module commands. You can find these under '''Setup >> General Settings >> Other Tab''' as '''SQL Error Reporting''' or '''Hooks Debug''', or under '''Utilities > Logs > Module Debug Log'''. Make sure to disable these for debugging errors that may occur, since they can and will increase the database size exponentially.
+
*'''Logging''' — In WHMCS, you can enable logging for, for example, SQL errors, hooks loading, or module commands. You can find these under '''Setup > General Settings > Other Tab''' as '''SQL Error Reporting''' or '''Hooks Debug''', or under '''Utilities > Logs > Module Debug Log'''. Make sure to disable these for debugging errors that may occur, since they can and will increase the database size exponentially.
 
*'''Hooks/Addons''' — Third party customizations can slow the performance of WHMCS.  Ensure that any customization that you are using is up-to-date and works with the version of WHMCS you are running.
 
*'''Hooks/Addons''' — Third party customizations can slow the performance of WHMCS.  Ensure that any customization that you are using is up-to-date and works with the version of WHMCS you are running.
  

Revision as of 18:50, 12 May 2020

If you grow to have a large client base, page loads may begin to slow down. This is because the more data you have, the larger the database becomes, and so calculating and looping through the data will naturally take longer. However, there are some things you can do to help keep things fast:

Software Related

  • Disable Sidebar Stats — The system calculates sidebar stats in WHMCS on every page load. Normally, this is not an issue, but when your database becomes large it can take longer. To avoid that, disable the "'Sidebar Statistics'" admin role group permission in Setup > Administrator Roles for any roles you use. After you do this, the system won't calculate these stats. You can still obtain all the stats via the actual reports section.
  • Disable Ticket Counts — When you have a lot of tickets, calculating the number of tickets per status to display each time you open a ticket can slow things down. To avoid that, disable the ticket counts by adding the following line to your WHMCS configuration.php file:
    $disable_admin_ticket_page_counts = true;
  • Logging — In WHMCS, you can enable logging for, for example, SQL errors, hooks loading, or module commands. You can find these under Setup > General Settings > Other Tab as SQL Error Reporting or Hooks Debug, or under Utilities > Logs > Module Debug Log. Make sure to disable these for debugging errors that may occur, since they can and will increase the database size exponentially.
  • Hooks/Addons — Third party customizations can slow the performance of WHMCS. Ensure that any customization that you are using is up-to-date and works with the version of WHMCS you are running.

Server Related

  • MySQL Tweaks — WHMCS performance is largely dependent on a correct MySQL® configuration, especially for larger databases. Make any changes to the server's my.cnf</ttt> file under the <tt>mysqld section, usually in /etc/my.cnf (cPanel servers and most others). As a starting point, they may want to set max_connections to a low value like 50 and increase based on their available RAM. When you are done configuring this and the following other important settings, restart MySQL and let it run for 48 hours:
    • wait_timeout (at least 300, so MySQL doesn't drop connections too soon)
    • sort_buffer (2–4 MB)
    • read_buffer (2–4 MB)
    • max_allowed_packet (16 MB
      MySQL Tuning
  • System Tweaks — WHMCS is a PHP MySQL script, and so the more RAM or SWAP memory and raw processing power you have at your disposal, the better the performance from your installation. For more information, see our System Requirements. We recommend using the higher set values and modules under the Recommended Settings for best results.