How to upgrade to PHP7 version from .htaccess

How to upgrade to PHP7 version from .htaccess

In case that you can’t use the PHP Version Manager in cPanel, you can change your PHP version by adding a line of code to your .htaccess file of your wordpress website.

To apply these changes you can use a FPT software like FileZilla (this is what i usually use). Locate your .httaccess file and at the top of the document add the following line of code:

1
AddType application/x-httpd-php71 .php

Or this line of code if the first one doesn’t work for you

1
Action application/x-httpd-php71 /cgi-sys/php71-fcgi-starter.fcgi

Here is an example

That’s all there is to it.