⚡️Servebolt is growing fast! Want to join our team and help grow Servebolt even faster? Check out our open jobs and apply.

WordPress 5.0 PHP 7.2 vs PHP 7.3 Performance and Speed Benchmark

Terminal codes

Is PHP 7.3 faster than PHP 7.2? Should I use PHP 7.3 for my WordPress site? We have done our own performance testing for WordPress running with WooCommerce and benchmarked PHP 7.2 against PHP 7.3.

We installed a standard WordPress 5.0 with the Storefront theme and imported the 50 products supplied by WooCommerce as sample data on a standard Servebolt High Performance plan.

We wanted to test whether PHP 7.3 was performing better than PHP 7.2, and therefore bypassed the reverse proxy and ran tests directly against the backend web server running the PHP, effectively bypassing all caching. The tests were run from the server to eliminate network bias.

We used ab as the testing tool, running 3.000 requests with a concurrency of 1000, with keep alive enabled.

 ab -k -n 3000 -c 30 -H "Host: phpben-4836.bolt57.servebolt.com"  http://phpben-4836.bolt57.servebolt.com:8000/
This is ApacheBench, Version 2.3 <$Revision: 1826891 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking phpben-4836.bolt57.servebolt.com (be patient)
Completed 300 requests
Completed 600 requests
Completed 900 requests
Completed 1200 requests
Completed 1500 requests
Completed 1800 requests
Completed 2100 requests
Completed 2400 requests
Completed 2700 requests
Completed 3000 requests
Finished 3000 requests

Server Software:        Apache/2.4
Server Hostname:        phpben-4836.bolt57.servebolt.com
Server Port:            8000

Document Path:          /
Document Length:        64366 bytes

Concurrency Level:      30
Time taken for tests:   13.601 seconds
Complete requests:      3000
Failed requests:        0
Keep-Alive requests:    0
Total transferred:      193950000 bytes
HTML transferred:       193098000 bytes
Requests per second:    220.58 [#/sec] (mean)
Time per request:       136.007 [ms] (mean)
Time per request:       4.534 [ms] (mean, across all concurrent requests)
Transfer rate:          13926.03 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.1      0       1
Processing:   102  135   7.9    137     157
Waiting:       21   31   3.0     32      44
Total:        102  135   7.9    137     157

Percentage of the requests served within a certain time (ms)
  50%    137
  66%    139
  75%    141
  80%    142
  90%    144
  95%    145
  98%    147
  99%    148
 100%    157 (longest request)

We ran this test 3 times on PHP 7.2 and three times on PHP 7.3, and compared the numbers.

PHP 7.2 average: 192 requests per second
PHP 7.3 average: 224 requests per second

The results were consistent with very small variation. WordPress with WooCommerce running PHP 7.3 outperforms PHP 7.2 by 16.67%.

So what are you waiting for? It is time to get that extra performance boost. Upgrade your site to be PHP 7.3 compatible today, and get the 10-17% extra performance boost!

Benchmarks from PHP 5.6 and up

We did a few more compiles of PHP 7.3, and tested benchmarked those. We also did benchmarks on all major versions from 5.6 and up. See the results in the table below.

PHP only

 Req/sPHP 5.6PHP 7.0PHP 7.1PHP 7.2PHP 7.3PHP 7.3 v2PHP 7.3 v3
PHP 5.6401       
PHP 7.0761189.78%      
PHP 7.1809201.75%106.31%     
PHP 7.2826206.07%108.59%102.14%    
PHP 7.3926230.92%121.68%114.46%112.06%   
7.3 v2960239.40%126.15%118.67%116.18%103.67%  
7.3 v3972242.39%127.73%120.15%117.63%104.97%101.25% 
7.3 FINAL980244.39%128.78%121.14%118.60%105.83%102.08%100.82%

PHP and Database

 Req/sPHP 5.6PHP 7.0PHP 7.1PHP 7.2PHP 7.3PHP 7.3 v2PHP 7.3 v3
PHP 5.674       
PHP 7.0177239.19%      
PHP 7.1183247.30%103.39%     
PHP 7.2192259.46%108.47%104.92%    
PHP 7.3221298.65%124.86%120.77%115.10%   
7.3 v2221298.65%124.86%120.77%115.10%100.00%  
7.3 v3223301.35%125.99%121.86%116.15%100.90%100.90% 
7.3 FINAL224302.70%126.55%122.40%116.67%101.36%101.36%100.45%

Erlend Eide

CEO, Servebolt

Erlend founded Servebolt in 2014 and is currently growing Servebolt internationally from the offices in Hilversum, Netherlands. The passion for performance has been growing ever since the web started to get slower. Servebolt is part of the remedy. Erlend is a serial-entrepreneur, loves start-ups and has founded a series of companies the last 20 years. The Internet has always been his domain.

Related Posts