Optimize Performance

Performance issues in WHMCS can occur due to many factors, including insufficient system resources, large databases, problematic modules, or server configuration issues.

For steps to start troubleshooting issues in WHMCS, see Start Troubleshooting.

Optimize WHMCS’s Performance

The following steps can help you maintain faster speeds and avoid future performance problems:

1. Verify that your server meets the system requirements.

Check that your WHMCS installation meets the system requirements for your current WHMCS version.

Your server must meet the minimum memory, PHP version, and MySQL® version requirements in order to function correctly. However, increasing RAM or SWAP memory and processing power for your WHMCS installation will increase its performance.

For the best performance, we recommend using the recommended higher set values and modules instead of the minimums in our system requirements.

2. Disable any enabled logging and debugging features.

We recommend that you only enable logging and debugging features while you are actively troubleshooting a problem, and that you disable them as soon as you finish. These settings can significantly impact performance.

Check to ensure that you have disabled the following logging and debugging features:

Location in WHMCSSetting
Configuration () > System Logs > Module LogModule Log
The Mail tab at Configuration () > System Settings > General SettingsDebugging
The Other tab at Configuration () > System Settings > General SettingsDisplay Errors, Log Errors, SQL Debug Mode, and Hooks Debug Mode
For more information, see Enable Error Reporting and Logs in WHMCS.

3. Optimize your database.

A large database can make the system slow and inefficient. Database optimization involves checking table sizes, performing cleanup, and optimizing table structures.

Optimize your MySQL configuration.

WHMCS performance depends on a correct MySQL configuration, especially for larger databases. On most servers, you can make these changes in the mysqld section of the /etc/my.conf file.

  • As a starting point, set max_connections to a low value like 50 and increase based on the available RAM.
  • When you are 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_size (2–4 MB)
    • read_buffer_size (2–4 MB)
    • max_allowed_packet (16 MB)

Check database table sizes.

Check the size of your WHMCS database to find potential performance problems. Tables with millions of rows or disk sizes exceeding 1–2 GB may indicate performance issues.

To check database table sizes:

  1. Go to Utilities () > System > Database Status.
  2. Review the table sizes and row counts.

You can also check table sizes directly in MySQL using the following command:

SHOW TABLE STATUS

The following tables often grow large and impact performance:

Database TableDescriptionSafe to Prune
tbllog_registerCron statistics that display at Utilities > Automation Status.
tblwhoislogHistoric domain name lookups.
tblmodulelogModule debugging data.
This table can become very large if you enable module logging.
tbltickets and tblticketrepliesSupport tickets and replies.✖️
Do not prune this table unless absolutely necessary.

Perform system cleanup.

Using the tool at Utilities > System > System Cleanup can reduce overall database size and improve performance. We recommend running both the Simple and Advanced options to remove unnecessary data and optimize database performance.

Optimize database tables.

In normal operation, MySQL tables can generate overhead. The OPTIMIZE TABLE function reduces disk space that the system assigns to a table but does not use. WHMCS includes an Admin Area tool to optimize database tables, reducing overhead and improving query performance.

To optimize tables:

  1. Make certain that you have backed up your WHMCS database recently.
    If you do not regularly back up your data, you risk losing some or all of your customer data and WHMCS configuration.
  2. Go to Utilities () > System > Database Status.
  3. Click Optimize Tables.
For more information, see the MySQL OPTIMIZE TABLE documentation.

Address large database backup issues.

Large databases can impact performance during automated daily cron runs. The database backup process can be CPU, memory, and disk intensive while the entire database is exported, compressed, and uploaded or emailed. If performance issues are observed at the same time every day during the database backup process, this could be a potential cause.

If you have a particularly large database, we recommend that you disable backups in WHMCS and work with your system administrator to perform server-level backups instead.

For more information on large database backup issues, see Large Database Backup Failures.

Analyze database slow queries.

Work with your system administrator to check MySQL slow query logs to find problematic queries.

For more information on slow query logs, see the MySQL Slow Query Log documentation.

Consider advanced database indexing.

Experienced database administrators can add indexes to relevant tables to improve query performance. This requires specialized database administration expertise.

  • Only experienced database administrators should attempt this optimization method.
  • Always back up your database before modifying table structures.

For example, the following commands could add indexing to a tblinvoices table:

-- Index for looking up invoices by user
ALTER TABLE tblinvoices ADD INDEX idx_userid (userid);

-- Index for date-based queries and sorting
ALTER TABLE tblinvoices ADD INDEX idx_date (date);

-- Composite index for common queries that filter by both user and date
ALTER TABLE tblinvoices ADD INDEX idx_userid_date (userid, date);

-- Index for status-based queries
ALTER TABLE tblinvoices ADD INDEX idx_status (status);

4. 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 performance.

To avoid this issue, add the following line to your configuration.php file:

$disable_admin_ticket_page_counts = true;
For more information, see The configuration.php File.

5. Disable the client list’s services count.

If you have a large number of services, calculating the number of services for each client might increase the load time when you view the list at Clients > View/Search Clients.

To avoid this issue, add the following line to your configuration.php file:

$disable_clients_list_services_summary = true;
For more information, see The configuration.php File.

6. Test modules and customizations.

Custom addons, hooks, and customizations can interfere with WHMCS’s operation and impact performance.

Test hook performance.

To check for problems in custom hooks:

  1. Add the following line to your configuration.php file to temporarily disable hook loading:
    $disable_hook_loading = true;
    
    For more information, see The configuration.php File.
  2. Test the slow pages to see whether performance improves.
  3. Remove the line from the configuration.php file after testing.
Only disable hooks while actively troubleshooting a problem. WHMCS requires hooks for full functionality.

Find problematic addons.

If performance improves with hooks disabled, test your addons and customizations to find the hook that is causing performance issues.

To find problematic addons:

  1. Move installed addons and hooks to a temporary location.
  2. Test the slow pages again.
  3. Re-enable a single addon or hook and test the slow pages again.
  4. Repeat step 3 until the performance issue returns. The last addon that you enabled likely causes the problem.
  5. Contact the vendor for support or remove the problematic addon.

7. Test templates and themes.

To check for template-related performance issues, update your configuration to use WHMCS-provided themes and order form templates.

If you cannot reproduce the issue with the default template, the custom template likely contains inefficiencies. Contact the template vendor for support or consider using a more efficient template.

8. Check email performance.

Slow email transactions can impact overall system performance. Long loading times when performing an action involving sending an email (for example, placing an order, opening or replying to a support ticket, or publishing an invoice) are often due to connection issues to the chosen email provider.

To test email performance:

  1. Create a test client account.
  2. Send an email from WHMCS to that user.
  3. Measure the time that the system requires to send the email.
  4. If you use SMTP as your mail provider, enable debugging for additional information.
    Make certain to disable SMTP debugging after testing to avoid further performance issues.
If you use SMTP as your mail provider, consider switching to an external mail provider like MailGun, SendGrid, or SparkPost: they are often more performant than SMTP.
For more information, see Troubleshooting System Email.

9. Test provisioning performance.

Slow provisioning times can indicate connectivity or module issues.

To test provisioning performance:

  1. Go to Configuration () > System Logs > Module Log.
  2. Enable module logging.
  3. Provision a service.
  4. Measure the time that the system requires to provision a service.
  5. If delays occur, work with your system administrator or hosting provider to investigate connectivity issues, firewall timeouts, and custom module problems.
Make certain to disable module logging after testing to avoid further performance issues.

Improve WP Toolkit performance.

For WP Toolkit provisioning, you can improve performance by enabling asynchronous event handling.

To enable asynchronous event handling:

  1. Go to Configuration () > System Settings > General Settings and choose the Other tab.
  2. For Event Handling, select Concurrent (Launch an asynchronous request.).
  3. Save your changes.

10. Review connectivity issues.

Network connectivity problems can cause performance degradation. We recommend checking your firewall settings, server logs, and mod_security configurations for potential issues.

Common connectivity issues include:

  • Problems with your configured hosting servers at Configuration () > System Settings > Servers.
  • Problems in server logs (for example, Apache, IIS, or mod_security).
  • Missing server extensions.
  • SSL or cURL issues.
    For more information, see Troubleshooting SSL and cURL Errors

11. Analyze the server environment.

Server configuration and resource issues can impact performance even when CPU usage appears normal.

Review the following items, or ask your hosting provider or system administrator to check them:

  • Web server logs (for example, Apache or IIS).
  • MySQL server logs.
  • Server configuration settings.
  • Resource usage patterns.

12. Get additional help.

If performance issues continue after following these steps, open a WHMCS support ticket for help.

Last modified: 2025 September 18