PHP upgrade for Sitehost

On this page:


Overview

PHP 8.1 is currently the default version on the Sitehost test and Sitehost production servers. Additionally, PHP 8.2 and 8.3 are installed on both servers.

Users can select the PHP version for their website at UITS Enterprise Web Technical Services, as well as change the default command-line PHP version when connecting to Sitehost with SSH.

Timeline

  • January 19, 2023: PHP 8.2 was added to Sitehost test and production servers.
  • July 13, 2023: Sitehost test and production servers were upgraded to have PHP 8.1 as the default version, with the ability to switch to 8.2 or 8.0.
  • October 26, 2023: PHP 8.0 was removed from Sitehost test and production servers.
  • January 25, 2024: PHP 8.3 was added to Sitehost test and production servers.

Updates to the Enterprise WebTech website

The UITS Enterprise Web Technical Services website provides owners and proxies a quick way to switch their website's PHP version. The Sitehost section for the account contains a PHP Version drop-down; for additional instructions, see Manage Sitehost accounts with the Enterprise Web Technical Services site.

Note:
The PHP version you select on the Enterprise WebTech website affects the processing of your Sitehost pages. It does not change the command-line PHP version when connecting to Sitehost with SSH. To update PHP on the SSH server, see Updates to PHP on SSH.

Updates to PHP on SSH

If you have server-side scripts or cron jobs that use PHP, you will need to ensure that you are using the correct PHP version. PHP 8.1 is the default if you do not specify another version. To set a specific version of PHP on the SSH server, run one of the following commands:

  • php_version 8.3
  • php_version 8.2
  • php_version 8.1

These commands create a symlink in your ~/bin directory. After running one of the commands, log out of the account and log back in for the change to load into your environment variable. PHP versions will be removed from the SSH server when they reach end of life (EOL). You may receive a message that "no such file or directory can be found" if PHP is set to a removed version. Using the command php_version without specifying a version will set your account to use the default PHP version. Experienced users may also remove the symlink using standard Linux commands.

Notes:
  • These commands only work if bash is your default shell. UITS is working to add support for other shells.
  • Crontabs should include the following at the top to run the PHP version you set above:
    PATH=/groups/username/bin:$PATH

Features and changes

Recommendations

  • MachForm installations and websites that use full-featured solutions, such as WordPress and Drupal, should be updated to the latest versions of the software.
  • Make sure all plugins are checked for compatibility and updated as necessary.

This is document bgpd in the Knowledge Base.
Last modified on 2024-01-25 07:02:16.