PHP 7.1 & IonCube Decoder Now Available for All Sites on Pantheon

PHP 7.1 is now available platform-wide with security and performance improvements over 7.0.  PHP 7.1 is fully supported by WordPress and Drupal 8 core. While full Drupal 7 support is a work in progress, many sites can upgrade without errors, and any warnings that do pop up are easy to fix. If you’re still on PHP 5.x, then it’s high time to speed up your site by updating now!

In addition, Pantheon’s build of PHP 7.1 includes the IonCube decoder—required to use some licensed code, such as the popular Memberium premium WordPress plugin. Sites with IonCube requirements are now welcome on Pantheon!

PHP 7 Improvement Chart

Safely Upgrade to PHP 7.1

On Pantheon, your site’s PHP version is managed along with your code, so you can make sure everything works as you’d expect in Dev or a Multidev environment before deploying to Live. To upgrade to PHP 7.1, include the following in a pantheon.yml file in the root of your site’s codebase:

api_version: 1
php_version: 7.1

If you find there are any PHP notices due to legacy code, you can fix them in that environment and deploy both the PHP version update and necessary compatibility changes to your code at the same time. Be sure to check your New Relic benchmarks before/after deploying to see the improvement! Share your results on Twitter with the hashtag #NoBSBenchmarks.

Note that upstreams set the default PHP version via pantheon.upstream.yml, so any value you set in pantheon.yml will override that default. We will be rolling out PHP 7.1 as the default version for Drupal 8 and WordPress sites in the future, but you can get it now on a per-site basis via pantheon.yml, and make it available in your own Custom Upstreams by adding or updating your pantheon.upstream.yml file.

For detailed notes on changes in PHP 7.1 see http://php.net/manual/en/migration71.php

Using IonCube Decoder

If you are using a licensed plugin that requires IonCube, first make sure you’re on PHP 7.1. Next, enable it site-wide by adding a single line to settings.php or wp-config.php:

ini_set('ioncube.loader.encoded_paths', '/');

For improved performance you can also scope IonCube to the specific directory where encrypted code is stored.

Go forth & make awesome!


You may also like:

Topics Drupal, Speed & Performance, Testing & Optimization, WordPress