First PHP7 version was released in Dec 2015. This was the most important development in PHP since 2004 and one of its main benefits was its huge impact on performance. Now available for all Wetopi clients on this non stop -performance race- PHP7.4 arrives with more speed and security improvements.
Just to have some reference, running on WordPress 4.1.1 or higher, PHP 7 allows the system to execute twice as many requests per second in comparison with the PHP 5.6.
Let’s see in this post if we can say “WordPress screams on PHP7”.
Table of Contents
- Improvements in PHP 7.4
- Does WordPress support PHP 7.4?
- Can’t wait?
- But does WordPress screams on PHP 7.4?
- Results with PHP 5.6.25
- Results with PHP 7.4
- Our recommendation
- Related articles
Improvements in PHP 7.4
PHP 7.4 apart from the mentioned performance increase contains some language improvements: object type hinting, parameter type widening, plus security improvements: Libsodium (a cross platform, cross language library for encryption, decryption, password hashing we can use as an alternative to OpenSSL) and Argon 2 hashing algorithm.
You can check the full list of PHP 7.4 implemented changes on the Requests For Comments php wiki page.
Does WordPress support PHP 7.4?
As of December 2016, WordPress.org actually upgraded their official recommendation for users from PHP 5.6 to PHP 7 or greater.
You don’t have to – PHP 7.4 is production ready, recommended by WordPress.org and here at Wetopi now available. You can launch WordPress servers running php-fpm v7.0 or v7.4 with all configs finely tuned exclusively to work with WordPress sites.
Try it for yourself, we provide FREE full performant servers for your development and test:
- Signup in 10 seconds, we provide you with FREE development servers.
- Launch a WordPress server in 5 seconds:
- Switch to your preferred PHP engine in 1-click:
But does WordPress screams on PHP 7.4?
According to benchmarks from Phoronix, PHP 7.4 runs 13% faster than PHP 7.1 and 20% faster than PHP 7.0. This is 250% faster than PHP 5.6, which over 39% of WordPress users still have not updated from. Other tests support these numbers Official talks.php.net demonstrate with numbers that PHP 7.0 is twice as fast as 5.6 with half the latency.
In order to verify all this, let’s run a face to face speed/performance test with PHP versions: 5.6 and 7.4 in our own WordPress server infrastructure:
Test environment and Benchmark tool.
Thanks to our Wetopi clonation system, we create two identical servers of our wetopi.com site. Wetopi panel also provides an easy option to select the PHP engine of our server:
The resulting test environment: Two isolated servers, each one serving a replica of our current wetopi site. The former with PHP 5.6 the later with PHP 7.4
To run our speed/performance test, we will use Siege: easy, simple and returns a nice report.
- Two exact servers, both with Nginx serving HTTP (without SSL), each one with its PHP-fpm version and opcache active.
- No cache. We have disabled “W3 Total Cache” to make PHP process real load.
- We will run our siege with 10 concurrent jobs during 30 seconds.
- Isolated environment. Our test will run on a Virtual Machine isolated from the external traffic
- Same test: siege will run through a list of URLs in order from first to last and back again. This is our url.txt file for php7test.dev.wetopi.com:
http://php7test.dev.wetopi.com/ http://php7test.dev.wetopi.com/optimized_wordpress/ http://php7test.dev.wetopi.com/pricing/ http://php7test.dev.wetopi.com/blog/ http://php7test.dev.wetopi.com/support/ http://php7test.dev.wetopi.com/stop-breaking-wordpress/ http://php7test.dev.wetopi.com/save-time-zero-config-installs/ http://php7test.dev.wetopi.com/security-and-speed/
Launching the siege test:
siege -c 10 -b --time=30S -f url.txt
Results with PHP 5.6.25
Lifting the server siege... done. Transactions: 535 hits Availability: 100.00 % Elapsed time: 29.46 secs Data transferred: 6.05 MB Response time: 0.55 secs Transaction rate: 18.16 trans/sec Throughput: 0.21 MB/sec Concurrency: 9.92 Successful transactions: 535 Failed transactions: 0 Longest transaction: 1.83 Shortest transaction: 0.11
Results with PHP 7.4
Lifting the server siege... done. Transactions: 1236 hits Availability: 100.00 % Elapsed time: 29.28 secs Data transferred: 13.95 MB Response time: 0.24 secs Transaction rate: 42.21 trans/sec Throughput: 0.48 MB/sec Concurrency: 9.96 Successful transactions: 1236 Failed transactions: 0 Longest transaction: 0.37 Shortest transaction: 0.06
|PHP 5.6||PHP 7.4|
|535 Transactions||1236 Transactions|
Response time – ms
Response time – ms
The speed benefits are evident: more than 2.3 times faster.
PHP 7 first release was in Dec 2015 so lets say its time to adopt it in our production WordPress site. Notwithstanding the foregoing, our advice is — Start by testing the compatibility of your WordPress theme and plugins in a sandboxed or test environment —.
Running PHP 7.4 Your WordPress site will be fast, use less memory and will be able to accept more customers!
We are techies passionate about WordPress. With wetopi, a Managed WordPress Hosting, we want to minimize the friction that every professional faces when working and hosting WordPress projects.
Not a wetopi user?
Free full performance servers for your development and test.
No credit card required.