What to do if Upgrading PHP Crashes WordPress
The WordPress dashboard issues a warning if the site’s PHP version is not the best for the site or if it is out of date (deprecated).
Running a site on a deprecated version is not recommended and it is important to upgrade as soon as possible.
If you have access to cPanel you can upgrade PHP yourself or alternatively ask your hosting company to do this for you. However, it may be the case that upgrading PHP crashes WordPress.
Reasons Why Upgrading PHP Crashes Your Site.
Your chosen theme has not been updated to work with the latest version of php
How to check
Install and activate a simple theme such as Twenty Twenty-one or Twenty Twenty-two. If your site now works you know the theme is at fault. If not try option 2 (below).
a. – Check to see if there is an update available
b. – Ask the theme creator to update the theme
c. – Change to a different theme
You are using outdated plugins that are not compatible with the latest php version
How to Check
Make sure all your plugins are updated. If the site is still not working, deactivate all your plugins then check again. If the site is still not working then activate the plugins one by one checking your site each time until you find the one that crashes the site.
a. – Contact the plug in creator and ask for the plugin to be updated
b. – Find an alternative plugin
There is not enough memory allocated to php
How to check
Check the error logs for your site. There should be an entry relating to your site not working. If it states allowed memory size exceeded then you need to increase memory allocation.
a. Increase memory allocation in cPanel – In control panel go to MultiPHP INI editor. Select your domain as editor. Scroll down and find memory limit. Change to 256M and apply.
Return to Control panel and find MultiPHP Manager. On the right change to latest version, but don’t apply. Check the selector box to highlight domain then click apply. Check site is running okay. If you get a maintenance message just wait a few minutes then refresh. If you get a 500 error then return to your old version of php, increase memory in MultiPHP INI to 512 or 1024 and try again.
b. Ask your hosting provider to do this for you.
If you have tried these options and your site is still not working it is probably best to ask your hosting provider for help.