The solution to this problem is quite simple, but there are factors that can complicate it. I will talk about this and the rest of this article.
For example, I took a Ukrainian hosting.
I recommend always making a back-up before making changes!
Choosing the PHP version
To do this you need to go to your cPanel account, then select “Software and Services” > go to “Select PHP version” > select the desired PHP version from the drop-down list and click on “Set as current”.
Volodymyr Kuzma | The Download Speed of Your Website Affects SEO
In order for your website to update PHP you need to insert this code in the .htaccess file:
# For the РНР version 7.0 <FilesMatch "\.php"> SetHandler application/x-httpd-alt-php70 </FilesMatch> # For the РНР version 5.3 <FilesMatch "\.php"> SetHandler application/x-httpd-alt-php53 </FilesMatch>
Selecting PHP directives and extensions
You can enable or disable certain PHP extensions for your account yourself. To do this you need to go to your cPanel account, then select “Software and Services” > go to the “Select PHP version” menu > the page that opens will list all available extensions. You can check the necessary extensions and press Save at the bottom of the page.
Volodymyr Kuzma | New Version of the Block Editor WordPress Gutenberg 7.1 Is Out
As for the directives, you should go to your cPanel account, then select “Software and Services” > go to “Select PHP version” > “Switch To PHP Options” and specify the required values for the following parameters (These changes will cause the /etc/php.ini file to be adjusted).
The complexity of this process can be caused by your hosting or other errors that may occur after the upgrade.
It is based on Hostiq.ua materials.