French flag Hosted and supported in France A human reply within 12 hours 06 65 13 24 36
← All articles Hosting & performance17 min read

How do I change PHP version on WordPress safely?

Theme, plugins, custom code, PHP extensions, logs and rollback: the method for moving up a PHP version without turning the switch into an outage.

Your host announces the end of a PHP version, or Site Health recommends moving up a version. The change itself takes only a few seconds in an admin panel. What calls for care is everything that happens afterwards in the theme, the plugins and the code added over the years.

A WordPress dashboard in front of servers, preparing a PHP update
Changing PHP version: a change of engine, to be prepared like a small migration.

What PHP does in a WordPress site

WordPress is written in PHP. For every page not served from a cache, the server runs the WordPress core code, the theme's code and that of every active plugin, then queries the database to build the page. PHP is therefore the engine that runs the whole site, the admin included, along with the forms, a shop's basket and the scheduled tasks.

Changing PHP version means changing that engine. Most of the time the site works exactly as before, often a little faster. But every new branch removes old functions, tightens certain checks and alters behaviour at the margins. Code written several years ago that worked through tolerance can then stop dead.

Only the WordPress core is tested by the WordPress team on each PHP branch. Every layer above it depends on its own authors.

Why PHP versions change, and what that means for you

The PHP project releases a new branch at the end of every year. Each branch gets roughly two years of active support (bug and security fixes), then two years of security fixes only. After that date, no vulnerability found is fixed by the project any more.

THE OFFICIAL PHP.NET SCHEDULE

The state of the PHP branches on 19 October 2026

BranchActive support untilSecurity untilWhat it means in practice
PHP 8.1 and earlierOverOver (8.1: 31 December 2025)No fixes at all: upgrading is the priority
PHP 8.2Over31 December 2026Security ends in a few weeks: aim higher
PHP 8.3Over31 December 2027A cautious target for a site with older plugins
PHP 8.431 December 202631 December 2028A balanced target for most up-to-date WordPress sites
PHP 8.531 December 202731 December 2029The newest branch: check every important plugin

On the WordPress side, version 7.0 raised the minimum to PHP 7.4 and works up to PHP 8.5. The 7.4, 8.0 and 8.1 branches are now supported only for backward compatibility, and PHP 8.4 or 8.5 are recommended for a new installation. On the WooCommerce side, the publisher recommends PHP 8.3 or above, and has announced that WooCommerce 11.6, due in February 2027, will require PHP 8.1 at minimum.

In practice, staying on a branch with no fixes breaks nothing on the day. The risk is a silent one: a PHP vulnerability found tomorrow will not be fixed, and plugins will eventually require a newer version for their own updates. The change should therefore be planned, not forced on you the day before a deadline.

What has to be compatible, layer by layer

The question “is my site compatible with PHP 8.4?” has no single answer. It breaks down into as many questions as the site has layers.

The WordPress version

Update the WordPress core first, on your current PHP version. An old WordPress has not been tested with recent PHP branches, and you do not want to change two engines at once. Once the core is up to date and the site checked, you will be able to attribute any error unambiguously to the PHP change. If a core update itself causes trouble, the guide on WordPress stopped working after an update sets out how to isolate the cause.

The theme and the page builder

A maintained commercial theme generally states the minimum and tested PHP version in its documentation or its changelog. A bespoke theme, or a commercial theme that is no longer updated, offers no such guarantee: it has to be tested. Child themes often contain code added in functions.php that deserves the same attention.

The plugins

On WordPress.org, every plugin shows a minimum required PHP version, but rarely the highest version tested. The most reliable signal is the date of the last update and the changelog. A plugin that has had no update for several years is the first suspect behind an error after the switch, as the guide on a a WordPress plugin breaking the sitedescribes. Premium plugins bought once and never renewed are a common case: an expired licence also blocks compatibility updates.

The custom code

Snippets added to the theme, an in-house plugin, a connector to an ERP or a CRM, an import script: nobody tests that code but you. It is often what contains the constructs removed from recent versions. A quick review by a developer, or a full test on a copy, is essential if that code exists.

The server's PHP extensions

PHP ships with optional modules: intl, mbstring, curl, zip, gd or imagick for images, sodium, exif. On many hosting plans they are enabled version by version. Changing version can therefore disable a module a plugin depends on. Compare the list under Tools > Site Health > Info > Server before and after.

Memory and the execution limits

The memory limit (memory_limit), the maximum execution time and the maximum upload size are often set per PHP version in the host's panel. A new version can start again with lower defaults. A memory limit that is too low produces a WordPress critical error that looks like an incompatibility when it is in fact a setting.

The database, where it is relevant

Changing PHP version does not change the MySQL or MariaDB server. If, on the other hand, your host takes the opportunity to migrate the database too, or you change host at the same time, the database version becomes a second variable. WordPress 7.0 accepts MySQL or MariaDB from 5.5.5, but recommends MySQL 8.4 or MariaDB 10.11 and above. Keep the two changes apart where you can.

Deprecated, warning or fatal error: reading the logs properly

After a switch, the logs sometimes fill up with messages. They are not all equally serious, and confusing them leads either to panic over nothing or to ignoring a real failure.

Can wait

Deprecated

A function or a syntax is still accepted but will be removed in a future version. The site works. Note the plugin concerned and plan its update before the next upgrade.

Worth a look

Warning and notice

The code has met an unexpected situation (a missing variable, a surprising type) but carries on. What it displays may be wrong: a price, a field or a calculation needs checking.

Blocking

Fatal error

Execution stops. The page is blank, shows a critical error or returns a 500 error. This is the signal that calls for a rollback or an immediate fix.

To see these messages without showing them to visitors, turn logging on in wp-config.php on the test copy: WP_DEBUG à true, WP_DEBUG_LOG à true and WP_DEBUG_DISPLAY à false. The file wp-content/debug.log then collects every message with the file and the line at fault, which points straight at the plugin or theme responsible. On production, prefer the PHP error log your host provides, and turn debug mode off once the tests are over.

The checklist before changing PHP version

This list is worked through in order. There is nothing exotic about it: it is the same discipline as before a migration, applied to a smaller change.

Before the switch

If you do not have a test copy yet, the guide on WordPress staging explains when it becomes essential and how to protect it. For a small, up-to-date brochure site, a quiet slot and a rollback ready to go can be enough.

The tool below does not read your site and cannot certify that a plugin is compatible: no information available from your browser would allow that. It assesses the level of risk from your answers and tells you what order to work in.

Free Host by French tool

Can I change PHP version?

Eight questions to estimate the level of risk in your switch and get the order to work in. The tool does not read your site: it cannot certify that a plugin is compatible, only tell you where to look first.

An indicative risk assessment, worked out in your browser. It replaces neither a test on a copy of the site nor a look at the error logs.

Not sure whether your server will support the new PHP version?

Have my configuration checked

The switch and the rollback

On hosting with a panel (cPanel, Plesk or an in-house interface), the change is generally made in a PHP version selector, per domain. On a managed server, it means changing the PHP-FPM pool attached to the site. Either way, the good practice is the same: change one thing, at a moment of your choosing, knowing exactly how to get back to the previous state.

  1. 01

    Test on the copy

    Move the staging site to the target version, with logging on. Go through every type of page, the admin, the forms and, for a shop, a complete order in test mode.

  2. 02

    Fix or replace

    Update, fix or replace every component that produces a fatal error. Keep the list of “deprecated” messages for later.

  3. 03

    Switch production over

    Pick a quiet hour, change the version, clear the caches (plugin, server; OPcache resets itself with the version change) and test the critical journeys straight away.

  4. 04

    Roll back if a criterion fails

    If a critical page breaks and the cause cannot be fixed in a few minutes, go back to the previous version. Rolling a PHP version back is generally immediate and does not touch the data.

A rollback you have planned for is not a failure. It is what lets you make the change calmly, instead of putting it off indefinitely.

Watch out for one particular case: if a plugin changed the database during the tests on the new version (migrating tables during an update, for instance), going back to the old PHP version does not undo those changes. That is one more reason to update the plugins before the PHP change, and not during it.

The tests after the switch

A home page that loads proves almost nothing: it is often served from a cache. The real tests cover what the visitor and the team actually do.

After the switch-over

Scheduled tasks deserve particular attention: they run in the background and their errors appear nowhere. An automatic backup, a stock import or a reminder email can fail for days without anyone noticing. The guide on WP-Cron and scheduled tasks shows how to check they really are running. For shops, test the payment too: an old gateway can fail after an upgrade, as the guide on a payment error after a WooCommerce update.

Finally, compare the response time before and after. A recent PHP version is often faster, but a slow site does not generally owe that to its PHP version: if the slowness persists, the usual causes are covered in WordPress server response time too high and WordPress slow despite good hosting.

The mistakes to avoid

Mistake 01

Updating everything at once

Core, plugins, theme and PHP the same evening: if it breaks, there is no way to tell which change did it.

Mistake 02

Jumping straight to the latest branch

Going from 7.4 to 8.5 piles up years of changes. A tested intermediate step reduces the number of unknowns.

Mistake 03

Hiding the errors instead of reading them

Turning error display off makes the message disappear, not the problem. The log has to stay readable.

Mistake 04

Judging on the home page alone

A page served from the cache loads even if PHP is failing behind it. Test the pages generated on demand.

Mistake 05

Keeping an abandoned plugin “because it works”

It works on the old version. Replace it before a compulsory upgrade forces you to in a hurry.

Mistake 06

Forgetting that the host can switch it for you

Some hosts change the default version at end of support. Find out the date and the procedure so you can pick your own moment.

At Host by French, changing PHP version is part of the day-to-day running of managed WordPress hosting : we note the sensitive plugins, test on a copy when the site warrants it, and keep the previous version available throughout the monitoring period. If your site has to change host anyway, the upgrade can be planned alongside the migration, but in two separate steps, each checked on its own.

FREQUENTLY ASKED QUESTIONS

Frequently asked questions about changing PHP version

Which PHP version should I choose for WordPress in 2026?

WordPress 7.0 recommends PHP 8.4 or 8.5 for a new installation. For an existing site, PHP 8.3 or 8.4 is often the best compromise: branches supported until at least the end of 2027 and widely tested by plugin authors. The right choice is still whichever one your theme and your plugins genuinely support.

My host is going to move my site to a new version: what should I do?

Ask for the date and the target version, then get ahead of it: update the site, make a checked backup and test the new version on a copy if your host allows it. Better to pick your own moment than to discover the change on a Monday morning.

Are “deprecated” messages serious?

Not immediately. They signal that some code uses a feature that will disappear in a future version. The site works, but the plugin concerned will have to be updated or replaced before the next upgrade.

Can I go back to the old PHP version?

Yes, generally within seconds from the hosting panel, as long as that version is still offered. The rollback touches neither the files nor the database, unless a plugin changed the database during the tests: hence the value of updating the plugins before changing PHP.

Does a recent PHP version make the site faster?

Often a little, since each branch improves the engine. But if the site is slow, the main cause is rarely the PHP version: heavy queries, plugins, a missing cache or front-end resources generally weigh more.

Do I need a staging site to change PHP version?

It is strongly advised for a shop, a site with custom code, or one with many plugins. For a small, up-to-date brochure site, a checked backup, a quiet slot and an immediate rollback can be enough.

IN SHORT

A PHP version is changed in a minute. It is prepared in an hour

Inventory, backup, test, switch, check: this short sequence turns a dreaded change into a routine operation, and spares you being caught out by the next end of support.

Review my site

Summary with an AI

Choose your assistant: the request is prefilled where that is possible, and always copied, ready to paste if need be.

ChatGPTSummarise the article PerplexitySummarise the article ClaudeSummarise the article CopilotSummarise the article MistralSummarise the article GeminiSummarise the article
THEY TRUSTED US

Client references

See all case studies
Montreuil-sur-Mer logo Data Labcenter logo Sofradom logo 70 Football logo Afrique sur 7 logo CyberJay logo Élisa Reddet logo Foire du Trône logo Goodyvest logo Kincy logo Lhotellier logo Audrey Mégelé du Bourg logo MYF logo
Sine Qua Non logo Make It Happen logo Sonance Audition logo ACME logo Beluvia Bar Store logo Desaltera logo Fête des Loges logo GD Menuiseries logo 3G Immo logo Lavish logo Maison du Feu logo Mieux Fiscal logo MYF Tea logo
Go deeper

Useful articles

See all articles
Protected servers illustrating an SSL certificate and HTTPS security
Infrastructure and operations16 min read

SSL valid but the site is “not secure”: the causes

The certificate is installed and valid, yet the browser says “not secure”. The cause almost always lies somewhere other than the certificate: resources over HTTP, a redirect, a subdomain, a proxy. Here is the order to check them in.

A test computer in front of servers, for a WordPress staging site
Infrastructure and operations16 min read

WordPress staging: when is it essential?

A staging site lets you test before touching the real site. Essential for some sites, out of proportion for others. Here is how to decide, and how to use one without creating new risks.

What they say about working with us

Google reviews about the support we provide for the Changing the php version for wordpress compatibility. page

Google logo 4,8/5 243 verifiable Google reviews Read the reviews
★★★★★
“A WordPress pro. His skills, his grasp of what we needed and his clear explanations made the whole project run smoothly.”
Nicolas Le Couteur Review published on Google
★★★★★
“Always available to answer questions, very professional. Every technical problem we ran into was resolved.”
Cuong Doan Review published on Google
★★★★★
“A professional who listens to his clients. Thank you for the commitment and the time spent on our project.”
Sakina Sedkaoui Review published on Google
★★★★★
“Someone you can trust, who understood my needs straight away and put an effective strategy in place.”
Vincent Loustalot Review published on Google
★★★★★
“Very attentive, motivated and able to propose tailored SEO strategies. The quality of the work is remarkable.”
Marine Mongodin Review published on Google
★★★★★
“Quality work, delivered on time. Maxime is responsive, suggests relevant adjustments and delivers careful work.”
Olivier Opron Review published on Google
★★★★★
“Spot on, perfect work, nothing to fault!”
Robin Gomez Review published on Google
★★★★★
“Maxime adapts very quickly, even to the trickiest technical situations. The result is always there.”
Philippe Bertieaux Review published on Google
★★★★★
“Impeccable work from start to finish, highly responsive and flawless quality.”
Alex Houillon Review published on Google
★★★★★
“The site is fast and visually very good. Maxime also helped us build our SEO strategy.”
Lois Guillermond Review published on Google
★★★★★
“An exceptional developer.”
Honoré Comlan Koumondli Review published on Google
★★★★★
“Maxime showed great professionalism and great creativity in helping us build our charity’s website.”
Julien-Benoit Birman Review published on Google
★★★★★
“A solid understanding of search optimisation when building a WordPress site.”
JM Review published on Google
★★★★★
“Maxime is responsive, a good teacher, and anticipates what is needed to get the strategy right.”
Romain Bergé Review published on Google
Your site deserves better

Let’s talk about your hosting

Tell us about your project. You get a clear recommendation, no jargon and no commitment.

Get my recommendation Reply within 12 hours • Migration handled • Free quote Active infrastructure
Google logo 243 Google reviewsVerifiable public reviews
Find my plan