Author Topic: Update default PHP version but keep old websites running the current version  (Read 3326 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
The default PHP version on my server is PHP 7.3 I want to update it to 8.0 or 8.1, but since I have lots of websites most of them are using the current default version I want to keep that websites with the current version. There are any way to do that automatically?

Some websites are already using a custom php version, that websites will be not affected by this, but the ones that don't set a custom php version I need to force to set version 7.3 before uptade the default php to 8.1

Offline
****
PHP-FPM is your answer
Google Hangouts:  rcschaff82@gmail.com

Offline
*

Offline
***
There are any way to do that automatically?

No.

PHP-FPM is your answer

Why?

Your first post shows that you know a bit about how these things works. That's why he gave you the short answer.

The long answer:

1. Install PHP 7.3 through PHP-FPM.
2. Go to Webserver Domain Conf and choose the domain(s) you want to stay with 7.3.
3. Select the appropriate Webserver configuration and then tell the panel to apply PHP-FPM 7.3 to those sites.
4. Double check everything is working right on those domains.
5. Now, upgrade your default PHP version to 8.x.

Now all websites will be using PHP 8.x except those domains you told the panel to keep using PHP-FPM 7.3 at point 3 above.
« Last Edit: February 10, 2022, 07:59:27 PM by iraqiboy90 »

Offline
*
There are any way to do that automatically?

No.

PHP-FPM is your answer

Why?

Your first post shows that you know a bit about how these things works. That's why he gave you the short answer.

The long answer:

1. Install PHP 7.3 through PHP-FPM.
2. Go to Webserver Domain Conf and choose the domain(s) you want to stay with 7.3.
3. Select the appropriate Webserver configuration and then tell the panel to apply PHP-FPM 7.3 to those sites.
4. Double check everything is working right on those domains.
5. Now, upgrade your default PHP version to 8.x.

Now all websites will be using PHP 8.x except those domains you told the panel to keep using PHP-FPM 7.3 at point 3 above.

Manually I know that I can create a custom configuration for each domain but do this for more than 200 domains, it's better for me buy a second server and keep the current one with this old php version.

All my websites use regular PHP running under Apache, I can't change it to php-fpm because it requires that I change the .htaccess in every website, lots of this websites are managed by my clients.