Skip to main content

Performance tuning and backups for cPanel

Improve speed and reliability on your cPanel VPS with MySQL, PHP, web server tuning, and a solid backup strategy.

Andy Wallace avatar
Written by Andy Wallace
Updated over 2 months ago

Performance and stability on a cPanel VPS depend on how well you tune MySQL, PHP, Apache, and your backup workflow. The adjustments below help you get more out of your resources while keeping your data safe.


MySQL and MariaDB tuning

MariaDB 10.6 or later provides good stability and strong performance on cPanel systems.
Adjust /etc/my.cnf so memory use matches your server size. For a VPS with 4 GB RAM, a reasonable starting point is:

[mysqld] innodb_buffer_pool_size=1G query_cache_size=64M max_connections=200 tmp_table_size=64M max_heap_table_size=64M

Restart the service after saving your changes:

systemctl restart mysql

You can fine-tune these values further as your workloads grow.


PHP optimization

Open WHM → EasyApache 4 and enable OPcache for the PHP versions you use.
Increase OPcache memory and file limits for better caching:

  • opcache.memory_consumption=256

  • opcache.max_accelerated_files=20000

Switching to PHP-FPM improves responsiveness, especially on busy sites. Each domain gets its own managed pool that handles load more efficiently than older CGI handlers.


Web server improvements

Apache on cPanel already includes HTTP/2 support, which helps with modern browsers.
You can add extra features through EasyApache:

  • Enable Brotli compression for faster page delivery.

  • Use LiteSpeed (licensed) or OpenLiteSpeed if you want an alternative web server with strong performance characteristics.

These upgrades help reduce CPU use and lower page load times.


Backup strategy

A reliable backup plan is essential. Open WHM → Backup Configuration and enable scheduled backups.

Good practices include:

  • Retain daily, weekly, and monthly backups.

  • Store copies off-server using S3, rsync to a separate VPS, or a remote FTP target.

  • Use incremental backups on large accounts to reduce disk usage and shorten backup windows.

Testing your backup restore process occasionally helps ensure everything works when needed.


These steps help build a fast, stable, and maintainable cPanel environment on your LumaDock VPS.

Did this answer your question?