Skip to main content
Upgrading PHP

Upgrading PHP for performance and security benefits

T
Written by Team Pressidium
Updated over a year ago

Upgrading your PHP version ensures that your websites receive all the latest security fixes and performance enhancements as well as the ability for your themes and plugins to utilize new exciting features and improvements.

PHP versions older than 8 are End Of Life (EOL, PHP: Supported Versions), do not receive active support and will be deprecated and eventually removed from our platform soon.

We recommend that you upgrade to at least PHP 8.1.x, since this version is compatible with the latest WordPress core versions and supported by the majority of the actively developed plugins and themes.

You can switch your PHP version directly from your Dashboard by following our guide "Switch your PHP runtime". Before changing your website's PHP version, we recommend reviewing your website for potential compatibility issues since new PHP major versions introduce backward incompatible changes.

Some helpful tips for upgrading:

Take a backup of your website.

It is always a good idea to create a backup of your website before taking any actions, to prevent any unintented data loss. You can easily create and download a full backup via the Dashboard and you can leverage Instant backups to rollback to previous version when upgrading your themes or plugins.

Upgrade WordPress core to a recent or latest version.

You don't need to worry about upgrading your WordPress core in Pressidium, since it is automatically managed by our platform through WordPress Safe Updates, but if your site was excluded from our updates, or not yet updated by our platform, you can manually upgrade WordPress via the Dashboard.

You can also consult the WordPress PHP compatibility matrix to review the compatibility chart and any related notes about PHP version-related changes.

Review your themes and plugins for compatibility with the target upgrade version.

Review your active theme and plugins documentation to verify that they support the version you want to upgrade to. Not all plugins and themes might be yet compatible with the latest PHP versions. If you notice a plugin or theme issue on your website, we recommend downgrading to an older PHP version and reaching out to the developer of the plugin or theme regarding PHP incompatibility.

Upgrade your themes and plugins to their latest versions.

Upgrade your themes and plugins to their latest versions or the most recent version that supports the PHP version you are switching to.

Review your website error logs

Review your website error logs for PHP warnings or PHP deprecation notices. You might need to temporarily enable WordPress debug mode to increase the verbosity and the information contained in the logs. See how to enable WP_DEBUG mode.

Compile a post-upgrade testing plan

Draft a list of URLs / pages or use cases you can review/check after upgrading to verify that function as intended. Some examples might be:

  • adding products to a cart for an e-shop

  • signing up for a course in an LMS

  • filling forms

  • carrying out common administrative work in the WordPress admin interface

  • reviewing and visiting "key" pages or popular pages based on traffic/user engagement.

  • reviewing scheduled tasks, i.e. importing products or running email campaigns, etc.

Prefer gradual updates

If you upgrade across several PHP versions, you might consider performing PHP version upgrades in sequence i.e. upgrade from PHP 7.4 to PHP 8.0, then to PHP 8.1, etc. This will help you isolate and pinpoint any specific issues with each version.

Use a staging environment

You can use your website's staging environment to test the PHP upgrades, fix potential compatibility issues with themes and plugins and perform the upgrade on your production (live) website only when all issues are resolved.

Use a website clone for debugging and testing

You can effortlessly clone your website to a new website with Pressidium's Cloning Tool and use it as a "test bed" for reviewing the upgrade process, documenting and resolving any compatibility issues. By creating a website clone to test the upgrade you can still use your original `staging` environment without interrupting your existing workflow.

Review the official PHP migration guides and backward incompatible features page

The PHP documentation site publishes guides for upgrading as well as a list of backward incompatible changes introduced in newer versions.

Migrating from PHP 7.0.x to 7.1.x

Migrating from PHP 7.1.x to 7.2.x

Migrating from PHP 7.2.x to 7.3.x

Migrating from PHP 7.3.x to 7.4.x

Migrating from PHP 7.4.x to 8.0.x

Migrating from PHP 8.0.x to 8.1.x

Migrating from PHP 8.1.x to 8.2.x

Advanced: Use a compatibility checker tool

If you are comfortable with the command line you can perform automated upgrade checks by using the PHP Compatibility Coding Standard for PHP CodeSniffer in your local DEV environment to analyze your code and third party plugins and themes for compatibility with higher and lower versions of PHP.

Happy upgrades!

Did this answer your question?