For Apache webserver:
Create .htaccess file with the following code :
The actual change is made by switching the SetHandler line with one of these depending on the version:
SetHandler application/x-httpd-php73
SetHandler application/x-httpd-php70
SetHandler application/x-httpd-php56
SetHandler application/x-httpd-php55
For LiteSpeed webserver:
AddType application/x-httpd-php56 .php5 .php4 .php .php3 .php2 .phtml
The actual change is made by switching the SetHandler line with one of these depending on the version:
AddType application/x-httpd-php73
AddType application/x-httpd-php70
AddType application/x-httpd-php56
AddType application/x-httpd-php55