I'm using Show
Shaeldon 8734 gold badges18 silver badges28 bronze badges asked Sep 24, 2012 at 8:16
1 To switch to PHP 4.4:
To switch to PHP 5.0:
To switch to PHP 5.1:
To switch to PHP 5.2:
To switch to PHP 5.3:
To switch to PHP 5.4:
To switch to PHP 5.5:
To switch to PHP 5.6:
To switch to PHP 7:
To switch to PHP 7.1:
answered Feb 7, 2013 at 12:01
APeazeAPeaze 1,4761 gold badge10 silver badges3 bronze badges 8 To switch to PHP 4.4:
To switch to PHP 5.0:
To switch to PHP 5.1:
To switch to PHP 5.2:
To switch to PHP 5.3:
To switch to PHP 5.4:
To switch to PHP 5.5:
To switch to the secure PHP 5.2 with Suhosin patch:
chiwangc 3,49816 gold badges25 silver badges32 bronze badges answered Jul 9, 2014 at 16:50
0 Note that all above answers are correct for Apache+mod-php setups. They're less likely to work with more current PHP-FPM setups. Those can typically only be defined in VirtualHost section, not .htaccess. Again, this highly depends on how your hoster has configured PHP. Each domain/user will typically have it's own running PHP FPM instance. And subsequently a generic See ServerFault: Alias a FastCGI proxy protocol handler via Action/ScriptAlias/etc for some overview. For Apache 2.4.10+/mod-proxy-fcgi configs you might be able to use something like:
Or answered Feb 4, 2018 at 12:53
mariomario 142k20 gold badges236 silver badges285 bronze badges 2 Try this to switch to php4:
Upd. Looks like I didn't understand your question correctly. This will not help if you have only php 4 on your server. answered Sep 24, 2012 at 8:22
EugeneEugene 3,22020 silver badges17 bronze badges just FYI in GoDaddy it's this:
answered Sep 23, 2013 at 18:11
EvaEva 4,5192 gold badges19 silver badges26 bronze badges 0 This worked for me PHP 7.2
PHP 7.3
answered Apr 23, 2020 at 17:15
2 An addition to the current marked answer: Place the addhandler inside the following scope, like so:
answered Feb 12, 2020 at 8:47
PatricNoxPatricNox 2,7051 gold badge16 silver badges22 bronze badges Go to File Manager on your CPanel >>> Public html >>> find the .htaccess file >>> right click on the on it >>>> click edit.see picture Type the number of the version you want to change to. i.e - 73, 70 or 71. Hope this helps. After that, save changes. answered May 20, 2020 at 12:50
0 for php8 code generated by Cpanel:
required PHP version should be installed answered Dec 30, 2021 at 9:18
For CPanel users (as of May 2022, selecting PHP v8.1), use Software -> "MultiPHP Manager" modifies PHP versions per subdomain. it adds this to the subdomain's directory's .htaccess file:
If you don't see the PHP version you want in the select list, then install it via WHM -> Software -> "EasyApache". answered May 5 at 21:10
Andrew EAndrew E 1282 silver badges4 bronze badges You can't change PHP version by .htaccess. you need to get your server updated, for PHP 5.3 or you can find another host, which serves PHP 5.3 on shared hosting. answered Sep 24, 2012 at 8:18
s_s_s_s_ 4655 silver badges20 bronze badges 5 How to set PHP version in. htaccess file?Locate the . htaccess file, right-click on it, and select edit. At the top of the file, insert the PHP handler for the version you would like to use. If there is a handler in the file already, it should be removed or replaced with your new handler.
How to change PHP version in htaccess cPanel?You can do that via cPanel > Software > Select PHP Version. Just choose the desired version and press Set as current. That configuration now becomes the default for your whole account.
What is .htaccess file in PHP?htaccess file is created in order to enable extra features for that subdirectory. You can use the . htaccess file to modify various configurations and thus make changes to your website. These changes include authorization, error handling, redirects for specific URLs, user permissions, etc.
How do I change PHP subfolders or subdomains?How to change PHP version for subfolders or subdomains?. Step 1 - Open your .htaccess file. First, open File Manager: Then, access the folder to which you would like to apply a different PHP version. ... . Step 2 - Edit . htaccess file. Add the following code to your .htaccess file (at the very beginning of it):. |