Simply Fast WordPress [5] 1000x Faster WordPress Tuning – PHP 5.6, OPCache, and APCu

Enable PHP 5.6

Next, enable PHP 5.6 with the web server.

[root@ip ~]# systemctl enable php-fpm
[root@ip ~]# systemctl restart php-fpm

With this we keep the configuration for Apache's event MPM+php-fpm but switch to PHP 5.6 instead of PHP 5.4. OPCache +APCu are already enabled.

Load the front page in your browser. Refresh a few times to get better results. In my environment the page load time was 32ms.

Page load time was 32ms
Checking the page load time with Firebug

Perform a benchmark test with ab.

[root@ip ~]# ab -n 100 -c 10 http://ec2-xxx.xxx.compute.amazonaws.com/

In my environment, requests per second was 61.84. There is a minimal performance boost over PHP 5.4.

Tuning contents Page load time Requests per second
Default environment 176ms 11.24
APC 70ms (251%) 29.20
OPcache+APCu 66ms (266%) 30.51
MariaDB settings
64ms (275%) 31.82
Translation accelerator (cache) 53ms (332%) 39.29
Translation accelerator (disabled) 36ms (488%) 56.78
gzip 35ms (502%)
Tuned settings 34ms (517%) 58.47
event MPM+php-fpm 33ms (537%) 60.79
AWS users 31ms (567%) 71.76
PHP 5.6+OPCache+APCu 32ms (550%) 61.84 (550.2%)

With this tuning we have achieved 5.5x more speed.

Next time, we will install PHP 7 to get double the performance of PHP 5.6, and get 16.9x more speed than the default environment.

[Previous article] [Next article]