Troubleshooting a broken website after switching PHP version

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).

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 8.0, test it with PHP 7.4 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) 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.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Where will I find my Cpanel?

You will find your CPanel at https://<<Your-Domain.com>>/cpanel

Using the cPanel MultiPHP Manager

MultiPHP Manager is a powerful tool within cPanel that allows you to manage PHP versions across...

Why Repair MySQL Databases?

Database corruption can occur due to various reasons, including server crashes, unexpected...

5 Steps to managing your PHP version.

Please follow these 5 steps!(1) Advise your IT person / web developer of the PHP upgrade. Make...

WordPress Backup and Restore

Disk Space Check Before creating a new backup, ensure you have enough free disk space equivalent...