Add Handlers To Change PHP Version
Add Handlers To Change PHP Version
Add Handlers To Change PHP Version -
This article will explain how-to add a PHP handler to your .htaccess files. This is useful if you want to customize the version of PHP that runs your PHP files by directly editing your .htaccess file. If you do not wish to edit the .htaccess file, you can use the cPanel to change your PHP version.
Adding the Handler to the .htaccess File -
The PHP handler is written into the .htaccess file. The .htaccess file is a hidden file that is read by the webserver. The webserver follows any instructions contained within the file. There are many ways to access this file. For the purposes of this article, we will explain accessing it through the File Manager on the cPanel of your hosting account. You can also have or use a separate .htaccess file in any given directory if needs be.
Below are the available PHP handlers -
In order to create a specific PHP handler you need to look at your .htaccess file. If you have an existing .htaccess file then add the following handlers to it, or if not, then you will need to create one.
PHP 8.1 -
PHP 8.0 -
PHP 7.4 -
PHP 7.3 -
PHP 7.2 -
PHP 7.1 -
PHP 7.0 -
PHP 5.6 -
PHP 5.5 -
PHP 5.4 -
Download Zip File PHP handlers -
If you would like to download a zip file containing an example .htaccess file, then click on the button below: