Thanks Marko.
I am the inexperienced administrator of my own blog, but was able to use your script to get everything running after upgrading my blog to WordPress 4.0 and then my PHP version to 5.5.
1. Logged into admin of my blog, deactivated plugins, then, upgraded to 4.0 from the dashboard.
2. Went to the Github link you provided and downloaded the file.
3.Opened the downloaded tar.gz file and extracted the php file.
4. SFTP’d the php file to my blog’s root (main) folder using Filezilla.
Here’s where I had to learn something. I wasn’t sure exactly what it mean’t to “execute from a browser“. I found out that it meant to:
5. Opened a browser and typed the following into the url bar for the site,
mydomain.com/gistfile1.php (gistfile1.php is the name of the file) and hit return.
6. I received the message “All files are already fixed. You are ready to go to use the latest PHP version.”
7. I then logged in to my 1and 1 account. Went to Control Panel > Hosting > Manage Webspace > php settings. I selected my domain and clicked on the “Change php version” button. I selected the php version 5.5, waited a few moments and it was updated.
8. I then went back to the my WordPress dashboard and reactivated the plugins one at a time to find out which would work and which were broken. (I only lost one, but I found an updated replacement)
Everything seems to be in great working order now.
Thanks, again, to Marko and the other forum posters.