Dear Virtualmin Community,
I am working to enhance the performance of a WordPress site hosted on a Virtualmin server, set up in March 2025, to improve page load times for a small business blog. While the site functions adequately, I seek to optimize PHP-FPM configuration to reduce response times and better handle concurrent users. Your insights would be greatly appreciated.
My server, running Virtualmin 7.30.8 on Ubuntu 22.04 LTS, operates on a VPS with 4GB RAM, 2 vCPUs, and Apache 2.4.52, hosting a single WordPress domain. The site, averaging 1,000 daily visitors, uses PHP 8.1 with PHP-FPM, configured via Virtualmin > Edit Virtual Server > Services > PHP-FPM Configuration.
I followed the Virtualmin documentation to install WordPress and enable PHP-FPM, setting a dedicated pool with default settings: pm.max_children=10
, pm.start_servers=2
, and pm.max_requests=500
. Monitoring via Virtualmin’s System Statistics shows average page load times of 1.2 seconds, but during peak traffic (approximately 50 concurrent users), response times spike to 3 seconds, and CPU usage approaches 80%.
To address this, I increased pm.max_children
to 15 and adjusted pm.max_spare_servers
to 4, which slightly improved performance but introduced occasional 502 errors under load. I reviewed Apache error logs (/var/log/virtualmin/[domain]_error_log), which indicated no specific PHP-FPM failures, and confirmed sufficient memory allocation via Webmin’s System Information.
I also enabled OPcache through Virtualmin’s PHP Options and verified its functionality, yet the performance bottleneck persists. I am particularly interested in fine-tuning PHP-FPM parameters or exploring additional optimization strategies to ensure consistent response times under varying traffic conditions.
What specific PHP-FPM configuration adjustments or optimization techniques would you recommend for a WordPress site on Virtualmin 7.30.8 to improve performance and stability?
Thank you for your expertise and guidance.