Change PHP version and extensions

php, php version, extensions, phpinfo, versions · 0 found this helpful

Each site on your account can run its own PHP version. Extensions, add-ons such as imagick or intl, are set once for the whole account.

Change the version

  1. Open Account → Hosting → your site → Performance.
  2. On the PHP version and settings card, click Choose PHP for each site. The PHP for each site page opens. The first time, it takes a few seconds to check which PHP each site runs.
  3. Find the card for your site. It shows the domain, its folder, and a badge such as Running PHP 8.0.30. Domains that share a folder are grouped on one card.
  4. Under PHP version, choose a version. Choose 8.3 or newer unless your software needs an older one. Account default keeps the account-wide version.
  5. Click Save.
PHP for each site, with a PHP version for each site

We save the choice, then check that the site loads and runs the new version. If it does, you see a message such as example.ca is updated and runs PHP 8.3. If it doesn't, we put the previous setting back and tell you what didn't take effect.

For WordPress, read Pick a PHP version for WordPress first, and test on staging.

Turn extensions on or off

  1. On Performance, find the Extensions card. It shows the PHP version the list applies to.
  2. Tick the extension you need, such as intl, imagick, gd, zip, or mbstring. Untick it to turn it off. All extensions shows the full list.
  3. Click Save.
Extensions on the Performance page

Extensions apply to every site on the account.

Change settings (memory, upload size)

Each site's settings are on the same PHP for each site page, under PHP settings. See Change PHP settings.

Check the result

The badge on each site's card shows the version it's running. Click Check again at the top of the page to check every site afresh.

For more detail, create a file info.php in your site folder:

<?php phpinfo();

Open https://example.ca/info.php, check the version and loaded extensions, then delete the file. It exposes details about your server.

The command line

The version you choose for a site applies to its web pages. The command line and scheduled tasks use the account default. Check it over SSH:

php -v
php -m | sort

To run a different version on the command line, give its full path, such as /opt/alt/php83/usr/bin/php.

If something goes wrong

Problem Fix
White screen after a change Choose the previous version and click Save. See Fix the WordPress white screen
"Call to undefined function" Turn on the extension under Extensions
Badge says Didn't answer The site didn't respond to the check. Make sure it loads, then click Check again
Extension isn't listed Ask support. It may be unavailable on shared hosting

Was this helpful?

Still stuck? Ask us and we'll walk you through it.