wordpress-with-php72.jpg

WordPress screams on PHP7

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.2 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”

Improvements in PHP 7.2

PHP 7.2 apart from the mentioned performance increase contains some language improvements: object type hinting, parameter type wideningplus 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.2 implemented changes on the Requests For Comments php wiki page.

Does WordPress support PHP 7.2?

As of December 2016, WordPress.org actually upgraded their official recommendation for users from PHP 5.6 to PHP 7 or greater.

Can’t wait?

You don’t have to – PHP 7.2 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.2 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:

  1. Signup in 10 seconds, we provide you with FREE development servers.
  2. Launch a WordPress server in 5 seconds:
    Launch a new WordPress site in one click
  3. Switch to your preferred PHP engine in 1-click:
    Switch to PHP 7 in 1-click

But does WordPress screams on PHP 7.2?

According to benchmarks from Phoronix, PHP 7.2 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.30 and 7.2.6 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:

Enabling PHP 7.2

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.2

Test clone for WordPress Screams on PHP7

To run our speed/performance test, we will use Siege: easy, simple and returns a nice report.

Test conditions:

  • 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.2.6

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.6PHP 7.2
0
Transactions
0
Transactions
0
Response time – ms
0
Response time – ms

Conclusion:

The speed benefits are evident: more than 2.3 times faster.

Our recommendation:

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.2 Your WordPress site will be fast, use less memory and will be able to accept more customers!

At wetopi, we want to minimize the friction that every professional face when working and hosting WordPress projects.

In short, we are just techies passionate about WordPress. With wetopi, a specialized WordPress hosting, we want to go further to offer professionals and agencies a platform to work efficiently and effectively.

Not a wetopi user?

Try now – you'll find an efficient way to work with WordPress

Free full performance servers for your development and test.
No credit card required.


1 Star2 Stars3 Stars4 Stars5 Stars (38 votes, average: 4.47 out of 5)
Loading...

Related:

Read How-to test the PHP7 compatibility of your WordPress Site without troubling production.

WordPress screams on PHP7
Share this post