Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

teguh_rijanandi's avatar

Multiple PHP in one Cpanel

I'm want to make a multiple php in my cpanel, i have a laravel apps and other sites (using wordpress). My wordpress sites will not work if i'm using php version 7.3. The PHP version must 5.5 for my wordpress sites.

And then if the PHP version is 5.5 my app with laravel will not work and then showing 500 Error.

The suitable solution for my case is multiple PHP version with htaccess. Do you can give me a example code for multiple using htaccess? Because i'm using this code is not work for me

AddHandler application/x-httpd-alt-php72___lsphp .php .php5 .phtml AddHandler application/x-httpd-php72 .php

<FilesMatch ".(php4|php5|php7|php3|php2|php|phtml)$">

SetHandler application/x-lsphp73

0 likes
4 replies
devfrey's avatar

Best option is to contact your hosting provider.

Also, you should really upgrade your PHP version. Like, immediately. PHP 5.5 was deprecated more than three years ago.

douglasakula's avatar

I doubt its an option to run 2 different php versions on the same shared host simulataneosly. You could do it on a dedicated host where you can change which directory php uses for intepreting the website files. On a shared host its not an option to run simulataneously - its either one or the other. It would be more worthwhile to fix the wordpress issues that come with the upgrade to version 7+ as opposed to trying to keep both versions. If you have to keep 2 different versions of php - then having 2 hosting accounts is an option that can work for you as well

jlrdw's avatar

One account per customer, and if you have all this crammed into one shared host why won't you just use D.O. Or similar.

Please or to participate in this conversation.