Recently I had a problem with a project. I created a website using wordpress and upgraded the hosting server to latest version 7.2. But other websites on this same hosting stop working. These other websites were pretty old and created in PHP version 5.6. It was showing HTTP Error 500. In cPanel there is an option to upgrade PHP version. But single PHP version is allowed for single cPanel.
1. Login to cPanel. Scroll down to Software section and click on "Select PHP Version". Next window select from the dropdown selection on top.
Change the PHP version through cPanel
1. Login to cPanel. Scroll down to Software section and click on "Select PHP Version". Next window select from the dropdown selection on top.
Change the PHP version using .htaccess file
Open .htaccess file through ftp or cpanel. Some times its not visible in cPanel. You can make them visible, view following article "How to show hidden files in cPanel?"
Edit .htaccess file in the root folder. Add the following code and run.
AddHandler fcgid-script .php
FCGIWrapper "/dh/cgi-system/php72.cgi" .php
Above code forces PHP to switch to 7.2 version.
Though this code was tested, if this doesn't work or causes any problem remove the lines and switch back to previous version.
Share Your Solutions
Share Your Solutions