There are a bunch of performance tweaks for the Apache webserver running WordPress. Our regular readers are already aware that Apache MPM Event and PHP-FPM, HSTS, HTTP/2 are almost mandatory these days for improved TTFB.
In this article, our discussion is only limited to the setting of the Apache web server which you can try on a dedicated running WordPress. For testing the settings, choose a test location on webpagetest.org
which is geographically closer to your dedicated server’s data center.
Suggested Settings Decrease the Load Time of SSL
I tend to suggest avoiding things like APCu WordPress Plugins. Although they make the page loading speed faster, the result is inconsistent. Temporarily deactivate such plugins for reliable testing.
---
The settings described below can be loaded from the default SSL site configuration file located at /etc/apache2/sites-available/
. Please do not add all the settings at once. Rather, try each set of settings, run a configuration test and reload the Apache webserver:
1 2 | apachectl configtest sudo /etc/init.d/apache2 reload |
The above will avoid restarting the server and hence you can work on a server with a live site. Below are the suggested settings which you can test.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | SSLHonorCipherOrder on SSLRandomSeed startup file:/dev/urandom 512 SSLRandomSeed connect file:/dev/urandom 512 SSLPassPhraseDialog builtin SSLSessionCache "shmcb:/var/run/ssl_scache(5120000)" SSLSessionCacheTimeout 300 SSLUseStapling On SSLStaplingCache "shmcb:/var/run/ssl_stapling(128000)" SSLStaplingReturnResponderErrors off SSLStaplingStandardCacheTimeout 3600 SSLStaplingErrorCacheTimeout 1200 SSLStaplingResponderTimeout 5 |
SSL Negotiation can be as fast as 16ms, while 100 to 150 ms is not completely bad. TTFB should be below 300ms. Distance from the user to the data centre, uncached GZIP, and network server congestion can increase TTFB. With the above settings, you should achieve at least the result below:
The average story will not change unless you take a whole site caching service, change the web design to minimal and use the best-performing DNS. There will be a tradeoff since most of us have a limitation of budget.