Skip to content
Speed and performance5 min read

How to choose and change your PHP version

Short answer

Choose the newest PHP version your code supports, which today usually means PHP 8.2 or 8.3. Check the requirements of your CMS, theme and plugins, test on a copy of the site, then switch in cPanel under MultiPHP Manager or Select PHP Version, and switch back immediately if errors appear.

ArabyHost teamLast updated: ShareWhatsAppXLinkedIn
Contents
  1. Which version to choose
  2. Before you start
  3. Step by step
  4. Troubleshooting
  5. On ArabyHost

PHP is the language that runs WordPress, WooCommerce, Laravel and most CMS platforms, and its version affects three things: security (old versions stop getting fixes), speed (each major release runs the same code faster), and compatibility (new versions remove old functions). Choosing a version is a balance: as new as possible, but only as new as your code supports.

Which version to choose

Version Status according to php.net Use it when
PHP 8.1 Security support ended at the end of 2025 Only for old code you can’t update yet
PHP 8.2 Security fixes until the end of 2026 Most sites, if 8.3 isn’t supported yet
PHP 8.3 Security fixes until the end of 2027 The default for new and updated sites

Before you start

  • Find the current version. In WordPress, open Tools » Site Health » Info » Server. On any site, create a temporary info.php containing <?php phpinfo();, open it in the browser, and delete it straight away, as it reveals server details.
  • Check requirements. WordPress plugin pages list “Requires PHP”; Laravel and other Composer projects declare it in composer.json, for example "php": "^8.2".
  • Make a backup and, ideally, a staging copy on a subdomain to test on.

Step by step

1. Update first, then check compatibility

Update the CMS, plugins and themes before changing PHP; newer releases usually fix compatibility. For custom code, check syntax against the target version with that version’s binary (paths vary by server; list them with ls /opt/alt/ or ls /opt/cpanel/):

find . -name "*.php" -not -path "./vendor/*" -print0 \
  | xargs -0 -n1 /opt/alt/php83/usr/bin/php -l | grep -v "No syntax errors"

For Composer projects, composer check-platform-reqs reports whether the PHP version and extensions meet the requirements of every package. Common breaking changes when moving from PHP 7 to 8.x:

  • removed functions such as each(), create_function() and the old mysql_* functions;
  • $string{0} string offsets, now a fatal error (use $string[0]);
  • passing null to built-in functions like strlen() (deprecated since 8.1);
  • dynamic properties on classes, and utf8_encode()/utf8_decode() (deprecated since 8.2).

2. Test on the copy

Switch only the staging domain to the new version (MultiPHP Manager works per domain) and click through the important paths: home page, login, forms, search, cart and checkout. Watch the error log while you do.

3. Switch the version

Option A: MultiPHP Manager. In cPanel open Software » MultiPHP Manager, tick the domain, choose the version from the PHP Version list, and click Apply.

Option B: Select PHP Version. On CloudLinux servers, open Software » Select PHP Version, choose from the Current PHP version list, and click Set as current.

If both tools appear, use one consistently. Select PHP Version generally applies only to domains that MultiPHP Manager leaves on the default (inherit) version; a domain set to a specific version in MultiPHP Manager keeps that version.

MultiPHP Manager writes a handler block to the domain’s .htaccess, similar to:

# php -- BEGIN cPanel-generated handler, do not edit
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php83 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit

4. Enable extensions and adjust settings

Each PHP version has its own extensions and limits, so check them again after switching. In Select PHP Version » Extensions tick what your app needs (for example intl, imagick, zip, gd, or ioncube_loader for encoded scripts), and under Options set memory_limit, upload_max_filesize and max_execution_time. For versions chosen in MultiPHP Manager, use Software » MultiPHP INI Editor. More on these values in php.ini.

5. Verify

Reload the site and the admin area, submit a form, and check the errors in Metrics » Errors and any error_log file in the site folder. Confirm the active version in Site Health or with a temporary phpinfo() file, then delete that file.

6. Match the command-line version

The PHP used in the terminal and in cron jobs can differ from the one serving web pages. To be certain, call the full path of the version you want, for example:

/opt/alt/php83/usr/bin/php ~/myapp/artisan schedule:run

The cron jobs guide covers scheduling in detail.

Troubleshooting

  • White screen or “There has been a critical error”: switch back to the previous version, then read the error log to find the plugin or file. See WordPress critical error.
  • Call to undefined function: a missing extension (such as mysqli or intl) or a function removed in the new version. See undefined function.
  • The browser downloads .php files, or a 500 error after a migration: the .htaccess still has a handler line from the previous host. Remove it, then apply the version again in MultiPHP Manager.
  • The change doesn’t take effect: the two tools conflict, or an .htaccess in a subfolder sets another handler. Check both, then purge your cache.
  • Composer says the PHP version doesn’t satisfy a requirement: the terminal is running a different version from the site; use the full binary path as in step 6.

On ArabyHost

Every plan offers PHP 8.1, 8.2 and 8.3, and you choose the version from cPanel, opened with one click from the Araby Panel. On AI/Developer plans you also get SSH jailed in CageFS, Composer and Git, so you can run the compatibility checks above in the terminal. After switching, the Araby AI assistant in the panel can read your error log and explain what broke, and daily JetBackup backups let you restore files if a fix goes wrong.

FAQ

Will changing the PHP version break my site?

It can, if the code uses functions removed in the new version or an old plugin isn't compatible. That's why you test on a copy first. If something breaks after switching, set the previous version back and the site recovers immediately.

Is PHP 8.1 still safe to use?

According to php.net, PHP 8.1 stopped receiving security fixes at the end of 2025, and PHP 8.2 reaches that point at the end of 2026. Plan your move to 8.3 if your code supports it.

Do all my sites need the same PHP version?

No. MultiPHP Manager sets the version per domain, so an older site can stay on 8.1 while you test a new one on 8.3.

Useful? Share it with someone who needs it:WhatsAppXLinkedIn

Read next

Ready to put your idea online?

Fast, isolated hosting, support that understands you, and an AI assistant that fixes problems with you.