Change PHP version of all servers

OS type and version: Ubuntu 18.04
Webmin version: 1.981
Virtualmin version: 6.17-3
Related products version: PHP 7.2 and PHP 8.0

My Ubuntu came with PHP 7.2. I’ve installed PHP 8.0 and tested a couple servers with it and everything is working fine. Now I need to switch all servers using 7.2 to use 8.0. Is there an easier way of doing it besides manual which will take days for me?

The execution mode is FPM if it’s relevant. I’ve already setup the Server templates to use 8.0 on future servers.

I’ve needed to tweak settings in a similar fashion and this helped a lot.

Changes web server settings for one or more domains.

virtualmin modify-web --domain name | --all-domains
                     [--mode mod_php|cgi|fcgid|fpm | --default-mode]
                     [--php-children number | --no-php-children]
                     [--php-version num]
                     [--php-timeout seconds | --no-php-timeout]
                     [--php-fpm-port | --php-fpm-socket]
                     [--proxy http://... | --no-proxy]
                     [--framefwd http://... | --no-framefwd]
                     [--frametitle "title" ]
                     [--webmail | --no-webmail]
                     [--matchall | --no-matchall]
                     [--includes extension | --no-includes]
                     [--access-log log-path]
                     [--error-log log-path]
                     [--document-dir subdirectory |
                      --move-document-dir subdirectory |
                     [--port number] [--ssl-port number]
                     [--url-port number] [--ssl-url-port number]
                     [--letsencrypt-renew | --no-letsencrypt-renew]
                     [--break-ssl-cert | --link-ssl-cert]

Do testing on your own please one one server or something like that, but this should help.

You can also use –all-domains option and it does the job.


That worked well. And this command is awesome. I’ll bookmark this.


This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.