Change PHP version
Switch a site to another PHP version, and see what else changes before you do.
Before you start
- You can open the site in Managed Websites. Anyone who can open a site can change its PHP version.
- Your code runs on the version you are moving to.
- Take a backup, to have a way back.
Change the version
Open Software & services
Go to Managed Websites, choose the site, then Software & services under Site settings. Choose Change… beside PHP.
Choose the version
Choose a version, such as 8.4. Before you switch to PHP 8.4 lists anything else that changes, such as an extension that switches off.
Switch
Tick any confirmation the dialog asks for, then choose Switch to PHP 8.4. The button names the version you chose.
The change applies now. When it is done, PHP under Services and the site header show the new version.
Change PHP version… is also in the site header's … menu.
What the labels mean
| Label | Meaning |
|---|---|
| In use | The version the site runs now. |
| Supported | A current version, with security fixes until the date shown. |
| Security fixes only | An older version. Security fixes stop on the date shown. |
| End of life | Gets no security fixes. Use it only while you upgrade your code. |
| Preview | A release candidate for trying your code. It cannot be chosen for production. |
Automate this
Change PHP version
Moves the site to another PHP version, one of the versions its PHP configuration lists as allowed.
curl -X PUT https://manage.corefinity.com/api/corestack/sites/1042/php-version \
-H "Authorization: Bearer $COREFINITY_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"acknowledge": [
"eol"
],
"to": "8.1"
}'Your assistant calls corestack_php_version_change.
{
"name": "corestack_php_version_change",
"arguments": {
"site_id": 4211,
"to": "8.4"
}
}Related
Was this helpful?