Blog

Composer detected issues in your platform: the extension requires PHP 8.3, what to do

The message "Composer detected issues in your platform" means that an updated extension requires a more recent version of PHP than your server, in this case PHP 8.3. This article shows you how to reopen the site immediately by restoring the previous version of the extension, and then how to prepare for the transition to PHP 8.3 with your host without rushing.

Composer detected issues in your platform: the extension requires PHP 8.3, what to do

Key points

  • "Composer detected issues in your platform" means that the extension requires a more recent version of PHP than the server.
  • nexya does not change the PHP version: this setting is managed by the host.
  • The Maintenance module keeps the previous version of each extension before it is updated, and restores it with one click.
  • You must turn on the module before the update, otherwise no copy exists.
  • With nexya Pro, an update that breaks the site is automatically canceled.

What “Composer detected issues in your platform” means

The message “Composer detected issues in your platform” appears right after updating an extension. It is often followed by a sentence like “Your Composer dependencies require a PHP version “>= 8.3.0″. You are running 8.2.x”. Depending on the server configuration, WordPress then displays a critical error or a white screen.

Composer is the tool that assembles the libraries an extension needs. Upon loading, it checks that the server has the PHP version required by these libraries. If it does not, it stops immediately, and this choice is intentional: a clear error is better than code that crashes later in a place that is difficult to find.

The message gives you two specific pieces of information. The requested PHP version and the one your server is using. Note them down: they will determine the next steps.

Why an extension switches to PHP 8.3 without warning

On the WordPress.org forums, the same question comes up constantly: “Why force us to switch to PHP 8.3?” Most often, the extension author has updated a library, and it is this library that requires PHP 8.3. The change sometimes goes unnoticed, even by the author.

WordPress normally refuses to install an update when the extension announces a higher PHP version than the server’s. This safeguard relies on what the extension declares in its header. If this declaration has not been updated, the update installs anyway, and it is Composer that blocks it at the first load.

So this is not necessarily a mistake on your part, or your host’s. But it is up to you to choose how to resolve it.

Two solutions: upgrade the PHP version, or roll back

The fundamental solution is for the server to switch to PHP 8.3. With most hosts, this can be set in the client area, site by site. However, you must verify that the theme and all other extensions support PHP 8.3: changing versions in a hurry risks replacing one error with another.

The immediate solution is to revert to the version of the extension that was working. The site reopens, and you can prepare for the PHP change calmly.

It must be stated clearly: nexya does not change your host’s PHP version. This setting remains with them. The nexya Maintenance module helps you with the second solution: it keeps the previous version of each extension before it is updated, and restores it in one click.

  • PHP 8.3 available and the site compatible: change the version via your host.
  • Compatibility unknown or PHP 8.3 unavailable: revert to the previous version of the extension in the meantime.
  • In any case: notify the extension author on their forum, with the two PHP versions indicated in the message.

Reopening the site by restoring the previous version of the extension

  1. 1

    Turn on the Maintenance module

    In the nexya hub, turn on the Maintenance module. Do this preferably before any update: it only keeps the versions it has seen pass through.

    Turn on the Maintenance module
  2. 2

    Closing the site while working on it

    If visitors encounter the error, activate the Maintenance module's maintenance page. They will see a clean message instead of a critical error.

    Closing the site while working on it
  3. 3

    Restore the previous version

    In the Maintenance module, choose the relevant extension and restore the version kept before its update. Reload the site: the Composer message should have disappeared.

    Restore the previous version
  4. 4

    Monitoring the site until the transition to PHP 8.3

    Turn off automatic updates for this extension, and run the Security module's vulnerability check to see if the old version is affected. The daily file comparison also alerts you to any unexpected changes.

    Monitoring the site until the transition to PHP 8.3

Restoring the previous version with the Maintenance module

The Maintenance module keeps a copy of the extension before each update, and two versions are saved. With this copy, you can roll back from the admin area, without searching for an archive or using FTP.

A limit to be aware of: the copy is only made if the module was already enabled at the time of the update. If you enable it after the fact, it cannot retrieve a version it never saved. The best practice is therefore to enable it now, before the next update.

With nexya Pro, an update that breaks the site is automatically rolled back. The free version keeps previous versions, and you choose when to roll back.

The previous version is used to reopen the site, not to stay on it indefinitely.

The lightweight firewall of the Security module rejects requests carrying an attack before WordPress starts, while you remain on the old version.
The lightweight firewall of the Security module rejects requests carrying an attack before WordPress starts, while you remain on the old version.

While waiting: do not stay on the old version for too long

An old version no longer receives fixes. If the author publishes a security patch in the meantime, it will only reach you once you have switched to PHP 8.3 and the current version.

Meanwhile, the nexya Security module can help. It checks installed extensions against known vulnerabilities: if the version you reverted to is affected, you will know. Its lightweight firewall also rejects requests carrying an attack before WordPress even starts.

Also consider automatic updates. If they are active for this extension, the version requiring PHP 8.3 might return on its own during the night. Disable them for this extension until the PHP change.

The Maintenance module cleans the database and exports a copy, which should be taken before changing the PHP version.
The Maintenance module cleans the database and exports a copy, which should be taken before changing the PHP version.

Before switching to PHP 8.3 at the host

Start by checking the current version in Tools, Site Health, Info tab, Server section. Then look for the PHP version supported by each extension and the theme. An extension that has not been updated for a long time deserves an extra check.

Take a backup of the database before the change. The Maintenance module exports one, in addition to the waiting page and database cleaning. If your host allows it, test PHP 8.3 on a copy of the site first.

Once the server is on PHP 8.3, update the extension again. The Composer message should no longer appear. If it returns, it will indicate the new required version, and you will then know exactly what to ask your host.

  • Current PHP version noted.
  • Theme and extensions verified for PHP 8.3.
  • Database exported.
  • Automatic updates for the extension reactivated after the change.

FAQ

Can nexya upgrade my site to PHP 8.3?

No. The PHP version is set at the host level. nexya allows you to restore the previous version of the extension while waiting for the server to be on PHP 8.3.

How many previous versions are kept?

The Maintenance module keeps two versions for each extension and theme updated while it was turned on.

Is the rollback free?

Yes, restoring the previous version is part of the free version. nexya Pro adds automatic rollback for an update that breaks the site.

The administration area no longer opens at all, what should I do?

WordPress normally sends the administrator an email with a link to recovery mode. Otherwise, rename the extension folder via FTP to deactivate it, then restore the previous version from the Maintenance module once the administration area is reopened.

The modules in this post

nexya maintenance nexya security nexya hub

Try nexya Pro free for 7 days

Every module, forms, newsletters and the page cache, on your site. No commitment.

See the plans Or discover the free version