Skip to main content

How to Upgrade PHP from 7.x to 8.5

Updated this week

Upgrading your website’s PHP version from 7.x to 8.5 is a multi-step process because it’s a major jump. PHP 8 introduces breaking changes, so careful planning is needed to avoid breaking your site. Upgrading means better security, improved performance, and avoiding obsolescence for your website.

Prerequisites

  • Access to cPanel or

  • Access to Funio Hub

  • SSH Access

Task completion: depends on expertise

Expertise: advanced

How to do it?

  1. Log in to your cPanel.

  2. In the Software section, choose Select PHP Version.

  3. Take note of your current PHP version and the enabled PHP extensions.

  4. Check if you are using a CMS (like Wordpress, Joomla, Drupal, etc.)

  5. If you have a CMS, check what plugins and theme your site is using

  6. Check the PHP requirements of the CMS, plugins and theme

Backup your Website

  1. In cPanel open the Backup Wizard in the File section

  2. Click Back up and follow the instructions

Audit Application Compatibility

PHP 8.4 introduces syntax and behavior changes. Verify if your CMS are compatible.

  • CMS minimun version: WordPress 6.4+, Joomla 4.4+, Drupal 10+, etc.

  • Plugins / Themes / Extensions: Must support PHP 8.4

  • Custom code: Check for deprecated functions

Common incompatibilities

  • create_function() removed

  • each() removed

  • Changes in type juggling and error handling

  • Deprecated functions and features

Recommended tools

Recommended Upgrade Path

PHP 7.0 > 7.4 > 8.0 > 8.1 > 8.2 > 8.3 > 8.4 > 8.5

This minimizes fatal errors and simplifies debugging.

PHP 7.0 to 7.4

Fix legacy issues:

  • each() removed

  • create_function() removed

  • old MySQL functions (mysql_*)

  • Deprecated curly brace string offsets

  • Old array/string handling

PHP 7.4 to 8.0 (Biggest breaking change)

  • Strict type enforcement

  • Fatal errors instead of warnings

  • Engine error handling changes

  • Removed functions

  • Internal API changes

🔵 Goal: You should not have fatal errors in 8.0

PHP 8.0 to 8.1

  • Deprecated implicit nulls

  • New warnings

  • Return type enforcement

  • stricter internal function behaviour

🔵 Goal: Clean deprecation logs

PHP 8.1 to 8.2

Critical:

Dynamic properties deprecated

$obj->newProperty = 'value'; // deprecated

How to fix?

class MyClass {

public string $newProperty;

}

🔵 Goal: No dynamic property warnings

PHP 8.2 to 8.3

  • Performance improvements

  • Engine optimizations

  • Minimal breaking changes

🔵 Goal: Stability

PHP 8.3 to 8.4

  • Performance upgrades

  • Memory handling improvements

  • Strict engine behaviours

🔵 Goal: Production hardening

PHP 8.4 to 8.5

  • Future compatibility

  • New features

  • Engine optimizations

  • Security improvements

🔵 Goal: Long-term stability

Troubleshooting and Common Issues

  1. Enable error logs

  2. Check for fatal errors in deprecated functions

  3. Databases connections errors

  4. Update CMS core

  5. Update plugins/modules

  6. Remove abandoned extensions

  7. Remove outdated and unsupported plugins and themes

🔵

Did this answer your question?