As suggested, it's not recommended. But you can do it on Linux without WO. It shouldn't mess anything up.
apt-get install -y software-properties-common
add-apt-repository ppa:ondrej/php
apt-get update
apt-get install -y php5.6 php5.6-fpm
I added this line to /etc/nginx/sites-enabled/{{mysite}}.conf
location ~* \.php$ {
# With php-fpm unix sockets
fastcgi_pass unix:/var/run/php/php5.6-fpm.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
}
Then I commented out these two:
#include common/php73.conf;
#include common/wpcommon-php73.conf;
[TIP] I think there is a better way to back up your sites-enabled/{{site}}.conf file so an update to WO doesn't kill it but this is temporary on a dev server so I don't care.
You aren't managing this in WO but you should still be able to do wo site update {{site}}
and move along when you're ready to get off PHP 5.6. You can remove it easily with apt-get uninstall php5.6 php5.6-fpm
. It may be more complete to do apt-get purge php5.6 php5.6-fpm
but probably not needed.