How to use different version of PHP for different Directories?

As PHP provided a great utility of using different versions of PHP for different Directories residing on the same hosting account. Many people don’t know how to change to their current PHP versions with another version of PHP. Currently there are severn different versions of PHP available starting from PHP 4.4 to PHP 6.0.

Following are the steps I have mentioned to change the current PHP versions installed with your directory.

  • Access your cPanel by logging in to your account.
  • Enter to Advanced Section
  • Here you will find PHP Version Change option
  • Select the Directory of which you want to change PHP version (Changes will take place for the subdirectories also)
  • Select the PHP version you want
  • Click on Save

Many Web hosting companies provides you the option of using multiple PHP versions for each different folder.