Docs / Web Servers / Apache Performance Tuning for WordPress

Apache Performance Tuning for WordPress

By Admin · Mar 1, 2026 · Updated Apr 23, 2026 · 27 views · 2 min read

Why Tune Apache for WordPress?

Apache with default settings can become a bottleneck for WordPress under moderate traffic. Proper tuning of the MPM module, caching, and connection handling ensures your WordPress site on a Breeze remains fast and stable during traffic spikes.

Prerequisites

  • A Breeze running Ubuntu 22.04+ with Apache and WordPress installed
  • Root or sudo access

Step 1: Switch to the Event MPM

The event MPM handles concurrent connections more efficiently than prefork:

sudo a2dismod mpm_prefork
sudo a2enmod mpm_event
sudo a2enmod proxy_fcgi setenvif
sudo a2enconf php8.3-fpm

Step 2: Tune MPM Event Settings

sudo nano /etc/apache2/mods-available/mpm_event.conf
<IfModule mpm_event_module>
    StartServers             4
    MinSpareThreads         25
    MaxSpareThreads         75
    ThreadLimit             64
    ThreadsPerChild         25
    MaxRequestWorkers      150
    MaxConnectionsPerChild 5000
</IfModule>

Step 3: Enable Compression and Caching

sudo a2enmod deflate headers expires
sudo nano /etc/apache2/conf-available/performance.conf
<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/css application/javascript application/json
</IfModule>

<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpeg "access plus 1 year"
    ExpiresByType text/css "access plus 1 month"
    ExpiresByType application/javascript "access plus 1 month"
</IfModule>
sudo a2enconf performance

Step 4: Disable Unnecessary Modules

sudo a2dismod autoindex status cgi
sudo systemctl restart apache2

Additional Tips

  • Use KeepAlive On with KeepAliveTimeout 3 for balanced connection reuse
  • Disable .htaccess lookups with AllowOverride None where possible and place rules in the vhost
  • Monitor Apache with apachectl -M to verify only needed modules are loaded on your Breeze

Was this article helpful?