How to optimize speed and reliability of your VPS hosting with advanced tuning and backup practices.
1) MySQL/MariaDB Optimization
- Use MariaDB 10.6 or higher (stable, supported by cPanel).
- Tune
/etc/my.cnf
based on RAM. Example (for 4 GB RAM):[mysqld] innodb_buffer_pool_size=1G query_cache_size=64M max_connections=200 tmp_table_size=64M max_heap_table_size=64M
- Restart MySQL after changes:
systemctl restart mysql
2) PHP Optimization
- Enable OPcache in EasyApache → PHP Extensions.
- Set
opcache.memory_consumption=256
,opcache.max_accelerated_files=20000
. - Use PHP-FPM with per-domain pools for better performance.
3) Web Server Enhancements
- Enable HTTP/2 (default in cPanel’s Apache build).
- Install Brotli compression via WHM → EasyApache → Apache Modules.
- Optionally replace Apache with LiteSpeed (commercial) or OpenLiteSpeed plugin.
4) Backup Strategy
- Enable WHM → Backup Configuration.
- Keep daily, weekly, and monthly backups with rotation.
- Store backups off-server (Amazon S3, rsync to another VPS, remote FTP).
- For large sites, enable incremental backups to save space.