Install older PHP versions?

Is there an easy way to force an install of older PHP versions? I’m very happy with PHP 7.1, but there are some plugins/themes I’d like to use that don’t support it yet (which is shameful, but still a barrier). I tried a simple search and replace to change 7.1 to 7.0 but more was needed.

Any help would be appreciated since I don’t want to reinvent the wheel.

I’d suggest dropping those plugins/themes, submitting PRs, or patching them yourself.

You can use this technique to apply patches via composer:

If that’s not an option, then just follow this PR in reverse to revert to PHP 7.0:

If you need PHP 5.6 then here’s the PR to rollback for that:

1 Like

My first thought too, but these are inherited premium plugins that I don’t want to maintain forks of or rewrite the functionality. I found a support request from March about the issue and there have been many updates since then, without this being fixed. Not a great sign, but a PHP version change seems like the quickest win.

I’ll attempt the “If that’s not an option” option.

Thank you.

Using multiple php fpms on same server:
http://www.ondrejsimek.com/blog/running-multiple-php-versions-is-so-easy-with-fastcgi/

At some point it may make sense to use php-fpm containers with
different directories mounted and a single nginx in front of them.