Applicable to:
- Plesk Onyx for Linux
Question
How to change PHP version for webmail in Plesk for Linux?
Answer
Note: In Plesk Obsidian, webmail uses PHP 7.3 that comes with Plesk.
-
Connect to a Plesk server via SSH.
-
Create a directory for custom configuration templates:
# mkdir -p /usr/local/psa/admin/conf/templates/custom/webmail
-
Copy the original files roundcube.php and horde.php to the created directory:
-
Roundcube:
# cp /usr/local/psa/admin/conf/templates/default/webmail/roundcube.php /usr/local/psa/admin/conf/templates/custom/webmail/
-
Horde:
# cp /usr/local/psa/admin/conf/templates/default/webmail/horde.php /usr/local/psa/admin/conf/templates/custom/webmail/
-
-
Run the command below to list all available PHP versions. If a required PHP version is not listed, install it using the steps from this KB article.
# plesk bin php_handler --list | grep fastcgi
id: display name:
fastcgi 5.4.16 by OS vendor
plesk-php72-fastcgi 7.2.23
plesk-php73-fastcgi 7.3.10 -
Modify the configuration file of Roundcube:
5.1. Open the roundcube.php file in a text editor. In this example, we are using the vi editor:
# vi /usr/local/psa/admin/conf/templates/custom/webmail/roundcube.php
5.2. Change the PHP handler from 'fastcgi' to any other id from step 4. In this example, we are setting PHP version 7.2:
-
Before
CONFIG_TEXT: FcgidInitialEnv PP_CUSTOM_PHP_CGI_INDEX fastcgi
-
After
CONFIG_TEXT: FcgidInitialEnv PP_CUSTOM_PHP_CGI_INDEX plesk-php73-fastcgi
5.3. Save the changes and close the file.
-
-
Modify the configuration file of Horde:
6.1. Open the horde.php file in a text editor:
# vi /usr/local/psa/admin/conf/templates/custom/webmail/horde.php
6.2. Change the PHP handler from 'fastcgi' to any other id from step 4. In this example, we are setting PHP version 7.2:
-
Before
CONFIG_TEXT: FcgidInitialEnv PP_CUSTOM_PHP_CGI_INDEX fastcgi
-
After
CONFIG_TEXT: FcgidInitialEnv PP_CUSTOM_PHP_CGI_INDEX plesk-php73-fastcgi
6.3. Save the changes and close the file.
-
-
Regenerate configuration files to apply the changes:
# plesk repair web -server
Comments
0 comments
Please sign in to leave a comment.