Changed the PHP version on webhosting and website fell

Started by Brijesh, Jan 29, 2023, 09:00 AM

Previous topic - Next topic

BrijeshTopic starter

Greetings, I mistakenly updated the php version via Beget hosting without taking a backup copy in UpdraftPlus-Backup/Restore plugin beforehand. I changed the php version from 7.4 to 8.1, then to 8, and reverted to 7.4, which resulted in my site becoming inaccessible and displaying a critical error message.

Furthermore, I observed that a php_errors log file was created in the hosting file manager. Can you kindly provide me with your support?


Once updated to the newest version, a lot of standard functions and methods have been substituted with different alternatives. It is crucial to recognize which functions have been affected and utilize Google to find the replaced ones to subsequently modify the code accordingly.

jckdear advises to register constants in wp-config.php for debugging purposes. It is crucial to exercise caution while doing so and make any modifications on a test site first. To debug, follow these steps:
1. Change the version back to 7.4;
2. Retrieve the files from the host's backup or your own backup;
3. Lastly, carefully examine the error text since debugging without it can be challenging. It's worth noting that compatibility between versions 7.* and 8.* is not great.

In addition to these steps, it is important to have a good understanding of the code in order to more efficiently debug any errors that may arise.


WordPress necessitates a PHP update for the reasons stated above; however, it operates seamlessly even on version 5.6.20 due to excellent backward compatibility. Whether or not to upgrade should be based on individual needs.

It is recommended to back up the site before upgrading so that it can be rolled back if necessary, and themes and plugins should be updated routinely to ensure uninterrupted functionality of the site. The PHP Compatibility Checker plugin can be used to discover compatibility issues, while problematic plugins and themes will need to be changed or reviewed by developers.

To guarantee proper functionality of updated plugins and themes, it is essential to choose developers with a good reputation. If the site malfunctions after updating PHP, plugins and themes may be the reason. Please be aware that WordPress support does not guarantee compatibility with the new version of PHP, therefore proper preparation is vital.

Updating PHP in WordPress can be accomplished by modifying the hosting settings on the control panel or by contacting technical support. For a more secure site, Joomla suggests upgrading to PHP 7.1 or later.

To upgrade to new PHP versions without any problems, your site should have at least Joomla 3.5. Contacting hosting support is typically the simplest method to update your PHP version, as they frequently do it for free and rapidly. Otherwise, updating can be done through .htaccess.

In summary, updating PHP can improve your website's security and functionality, but it's important to weigh the risks and take precautions such as backing up your site prior to any updates. Additionally, regularly updating themes and plugins will help ensure seamless functioning of your site.