The host panel gives you a dropdown of PHP versions. Changing it takes one click. Finding out whether the site still works takes a morning, and if it doesn't, you're doing it in front of customers.
Most of the prep work is finding out what is actually running, and making sure that undoing the switch restores data as well as files. Here is the sequence I'd run, in order.
Start with an inventory, including the parts that have no headers
cd /path/to/wordpress wp core version wp eval 'echo PHP_VERSION, " ", PHP_SAPI, PHP_EOL;' wp plugin list --fields = name,status,version --format = table wp theme list --fields = name,status,version --format = table wp plugin list --status = must-use --fields = name --format = csv ls -1 wp-content/ * .php 2>/dev/null
Enter fullscreen mode
Exit fullscreen mode
Save the list so you can diff against it after the switch:
{ wp plugin list --fields = name,status,version --format = csv wp theme list --fields = name,status,version --format = csv wp plugin list --status = must-use…