How to Change PHP Version in cPanel?

Changing PHP Version in cPanel

cPanel is the main management tool of the website that has enough features to manage website and its data. cPanel not only manages the website data but also allows user to modify the changes as required. I've written many articles on cPanel and its related features.
Today, I'm sharing an article that explains about the procedure with which you can manage PHP Versions for your website. In this article I will not only share the procedure to modify PHP version of your website but also share the steps with which you can modify changes in particular directories as well. Let us learn the whole procedure in detail.

#1. Change PHP Version of the website

You can easily change the PHP Version for your website by following the below given procedure. Let us go through the procedure in detail.
  • Login to cPanel associated with your website.
  • Get inside Software section and select MultiPHP Manager.

*You can also search for php or ini in the search bar to get results easily.
  • On the next page, you can see the php version that is set by default.
  • To change the PHP version of a particular website, first select the domain for which you want to change the PHP version.
  • Then select the PHP version from the drop down button as marked in the above image.
  • Then click over Apply to apply the PHP version.
That's it !
With this procedure you can apply a selected PHP version to the website of related domain. But suppose you want to make any changes and apply different PHP version in one of your website directory. So, to do the same follow the below mention steps.

#2. Change PHP Version of a particular directory

You can also apply different version of PHP even in website directory as well. Here, I'm illustrating the steps to do the same.
  • Login to cPanel and get inside File Manager section.
  • Inside File Manager, get into the domain directory or the directory for which you want to change PHP version.
  • Right click over the .htaccess file inside the directory and then Edit.
  • Edit the file with the given code.
<FilesMatch "\.(php4|php5|php7|php3|php2|php|phtml)$"> SetHandler application/x-httpd-alt-php74 </FilesMatch>
*Replace the highlighted PHP version in the given code.
  • To change the PHP version to 7.0, replace the php74 to php70.
  • Click over Save Changes to change the PHP version in particular directory.
The above given steps can be followed with the WordPress website as well. You just have to add the codes in .htaccess file inside WordPress installation directory.

Hope the article better describes the procedure to change PHP version for the website and for a particular directory. Do share your suggestions if the mentioned procedure worked for you and help you resolve the issue at your desk itself. 
Thanks For Reading !
cPanel                   Features of cPanel                     Web Hosting                     Cheap Web Hosting Services                           Cheap Reseller Hosting              VPS Hosting                     Dedicated Servers

Comments