After switching PHP version you should thoroughly check your website(s). This is a list of troubleshooting steps that a website owner / web developer can take, including common fixes to fix a broken website (blank page or '500 Internal Server Error'). Please follow these steps:

1) Check every part of your website(s) thoroughly.
Make sure the homepage and sub-pages are loading. Specifically test contact forms, photo galleries, online stores, and any dynamically generated content.

2) "500 Internal Server Error" is usually site or account-related, not server-related.
There are many different server-related error codes, but "500 Internal Server Errors" can usually be fixed by a website owner and do not require a server administrator. "500 Internal Server Error" messages are often caused by a custom php.ini file or scripts that are no longer compatible. Open the main directory of your website using an FTP application (like FileZilla) or use the File Manager in your cPanel control panel. Navigate to the main directory (public_html), find the php.ini file and re-name it to php.ini.old to attempt to fix the problem.

3) Blank pages occur when PHP error messages are suppressed.
If your website displays a blank white page and does not show any clear error message, it's very likely a PHP error message is being suppressed. Instead of displaying an error message on your website, PHP will save it to a file called an error_log located in the main directory of your website or in the sub-folder where the script is located. You can view and download the full error_log life using any FTP application or the cPanel File Manager. Web server error log messages and suEXEC event log messages can be viewed under the Mertics -> Errors page in your cPanel control panel.

4) Many PHP warnings and errors are caused by old plugins/themes.
This is particularly true for websites running WordPress. Old plugins/themes generate a lot of PHP warnings (saved to the error_log file) and in some cases PHP fatal errors (which will stop your website loading altogether). Ideally there shouldn't be an error_log file at all, so if you find one, there is some work to do!
If it's a WordPress website, please login to your WordPress admin dashboard (add /wp-admin/ to your website address) and check what updates are available there. Newer versions of plugins/themes will have security and performance benefits. If you are a website owner using WordPress, updating the core software and any plugins/themes should be a routine task for your website manager or IT person (or use auto-updates).
If your WordPress site has the Revslider plugin, you might find the error_log contains a message "PHP Fatal error: Uncaught Error: Call to undefined function mysql_error()" because the Revslider code needs to be updated to work with PHP 7.

5) Need to roll back to an older PHP version?
If you need to roll back your hosting account back to an older PHP version, you can do this in your cPanel control panel using the 'Select PHP Version' page (on CloudLinux servers) or 'MultiPHP Manager' page (on MultiPHP servers). You can select PHP 7.x or 8.x on this interface. If your website has issues working on PHP 7.4, test it with PHP 7.3 or lower versions. If you have already selected a particular PHP version, it should remain active after a server update.

6) Contact forms and e-commerce websites
If your website has a Contact form (or any PHP web script that sends outgoing email), make sure it's working by submitting a test email. If it's an e-commerce website, submit a test order.

7) Two points which only apply if you are upgrading your website from PHP 5.5 or earlier:
- When a web script connects to an email server in PHP 5.6 or greater, the SSL certificate is validated. This does not happen in PHP 5.5 or earlier. Therefore, the mail server must have a valid SSL certificate. Users connecting to a mail provider with a self-signed certificate will not be able to connect in PHP 5.6 or greater. Our own mail servers all use a valid SSL certificate so there shouldn't be any problem connecting to them. It might be an issue with other email providers and some clients might need to revert to PHP 5.5.
- Importantly, PHP 5.6 also checks the certificate name matches, which means web scripts may need to connect to the actual mail server hostname (the server hostname listed in your hosting account signup email) instead of their mail hostname alias (e.g. mail.yourdomain.tld), although both should have valid SSL certificates issued by AutoSSL.

8) Still experiencing issues?
If you encounter any technical problems, don't hesitate to get in touch and our team will be happy to assist you. Remember to include your website address, steps on how we can replicate the problem and also any PHP error message that you've encountered.

Updated by SP on 15/12/2022

Was this answer helpful? 7 Users Found This Useful (10 Votes)