Setup & site building · Guide
How to Update PHP for WordPress Without Breaking the Site
Short answer
To update PHP in WordPress, first check your current version in Tools > Site Health > Info > Server, then back up your site and update WordPress, plugins and themes. Change the PHP version in your hosting panel, for example to PHP 8.3 or 8.4, and then reload Site Health to confirm the new version shows. If pages break, switch back to the old version and fix the faulty plugin or theme first.
Key takeaways
- WordPress.org recommends PHP 8.3 or greater, as of November 2026.
- Check your current PHP version in Tools > Site Health > Info > Server.
- PHP 8.2 security support ends on 31 December 2026, and PHP 8.1 already ended on 31 December 2025.
- Change PHP in your hosting panel, not in WordPress, and test on staging first.
- If the site breaks, switch back to the old PHP version in the same host menu.
What does updating PHP actually change?
Updating PHP changes the language version your server uses to run WordPress, while your posts, plugins and theme files stay the same.
PHP is the programming language used to build and maintain WordPress, as the WordPress.org Site Health documentation explains. Your host runs PHP on its servers, so the version is a server setting, not a WordPress setting.
That split matters for planning. Updating WordPress, a plugin or a theme does not change your PHP version, and changing PHP does not update WordPress. You handle the two jobs in different places, and this guide covers the PHP side only.
Which PHP version should you update to?
Aim for PHP 8.3 or newer, and pick PHP 8.4 when your host offers it and your plugins support it, as of November 2026.
WordPress.org recommends PHP 8.3 or greater for running WordPress. WordPress still runs on PHP 7.4 and newer, but WordPress.org warns that those older versions have reached end of life and may expose a site to security problems.
The PHP project supports each release branch for 2 years of active support, then 2 more years of security fixes only. After those 4 years, the branch gets no more fixes at all.
| PHP version | Security support ends | Status as of November 2026 |
|---|---|---|
| 8.2 | 31 December 2026 | Security fixes only, ending soon |
| 8.3 | 31 December 2027 | Supported |
| 8.4 | 31 December 2028 | Supported, active support until 31 December 2026 |
| 8.5 | 31 December 2029 | Supported, released 20 November 2025 |
PHP 8.1 already reached end of life on 31 December 2025, and PHP 7.4 ended on 28 November 2022, according to the PHP unsupported branches list. If your site runs either one, move it up as soon as you can.
If you want more detail on picking a version, read which PHP version to use for WordPress.
How do you check the PHP version your site runs now?
Open Tools > Site Health > Info in your WordPress dashboard, expand Server, and read the PHP version line.
- Log in to your WordPress dashboard as an administrator.
- Go to Tools > Site Health.
- Select the Info tab.
- Expand the Server section.
- Read the value next to PHP version and write down the full number.
The Site Health screen sits at Tools > Site Health > Info, and its Server section lists your server setup and PHP values, per the WordPress.org Site Health documentation. The same page states that the screen only shows information, so you cannot change any setting from it.
Check the Status tab too. Site Health flags an old PHP version as a critical issue with the message "Your site is running an outdated version of PHP, which requires an update". If that warning is there, your version needs attention.
What should you do before you change PHP?
Back up the site, update WordPress, plugins and themes, and check your plugins against the new version before you switch.
- Make a full backup of files and database, and confirm you can restore it. Our guide to restoring a backup with UpdraftPlus shows the restore side of the job.
- Update everything first. Go to Dashboard > Updates and install pending WordPress, plugin and theme updates. Older plugin releases are the most common cause of errors after a PHP switch.
- Check each plugin's page on WordPress.org for its requirements and its last update date. A plugin with no update for a long time is the one most likely to fail on a new PHP version.
- Test on a staging copy first when your host offers one. Change PHP on the staging site only, click through it, and switch the live site only after staging works.
- Write down your current PHP version and the time of the change, so you can switch back fast if something breaks.
The WordPress.org hosting requirements also list MariaDB 10.11 or newer, or MySQL 8.4 or newer, so note your database version while you are checking the server. For the full server picture, see the WordPress hosting requirements guide.
How do you update PHP in cPanel?
In cPanel, open MultiPHP Manager under Software, tick your domain, pick the new version and click Apply.
- Log in to cPanel and find MultiPHP Manager in the Software section.
- Tick the checkbox next to your domain.
- Pick the new PHP version from the dropdown at the top right.
- Click Apply and wait for the change to finish.
Some cPanel hosts show Select PHP Version instead of MultiPHP Manager. The idea is the same: pick the domain, pick the version, and save. Menu names vary by host, so use your host's own docs if the names above do not match.
If you cannot find any PHP setting, ask your host. The WordPress.org Site Health documentation notes that server settings are often restricted or managed at the server level, so your host may need to make the change for you.
How do you update PHP on a managed host?
On a managed host, change PHP in the host dashboard, not in WordPress, using the host's own PHP tool.
SiteGround
Go to Site Tools > Devs > PHP Manager and click the pencil icon next to Change PHP version.
SiteGround's own guide explains the two choices there: Managed PHP, which lets SiteGround move you to a newer stable version when it is ready, or manual change, where you pick the version yourself. Managed PHP is on by default for new accounts.
Kinsta
In MyKinsta, go to WordPress Sites, open your site, then go to Tools and click Change under PHP settings. Pick the version and confirm.
Kinsta's docs note that you can turn Automatic PHP Updates on or off there, and that staging can run a different PHP version than production. Kinsta says the update may take up to 3 minutes.
Hostinger
In hPanel, go to Websites, open Dashboard for your site, then go to Advanced > PHP Configuration. Pick the version under PHP version, click Update, and confirm.
Hostinger's own guide warns that changing PHP resets extension values to their defaults, so check any custom extension settings after the switch. The change affects all sites on the same plan, except sites built with the AI Builder.
How do you check that the update worked?
Reload Tools > Site Health > Info > Server and confirm the PHP version line shows the new version.
- Open Tools > Site Health > Info and expand Server again.
- Confirm the PHP version line shows the version you picked.
- Open the Status tab and check that the outdated PHP warning is gone.
- Visit your home page, a post, a page with a form, and your login screen.
- If you run a store, place a test order or check the checkout page. Our guide to updating WooCommerce safely covers the store checks that pair with a PHP change.
Give the site a few minutes, then look at the front end as a visitor would. A white screen, a 500 error, or a page that stops halfway all point to a plugin or theme that the new PHP version broke.
What do you do if your site breaks after the update?
Switch PHP back to the previous version in the same host menu, then find the plugin or theme that failed before you try again.
- Go back to the same PHP setting in your hosting panel and pick the version you had before.
- Reload the site and confirm it works again on the old version.
- Update the plugin or theme that failed, or replace it if its author no longer updates it.
- Try the PHP change again on a staging copy, with the faulty item fixed or removed.
- If the site still fails after you switch back, restore the backup you made before the change.
Move up in smaller steps when you jump from a very old version, testing each step on staging. That narrows the fault to one version change instead of several at once.
Contact your host when the switch-back does not fix the site, or when you cannot find the PHP setting at all. Your host can see server error logs that WordPress cannot show you.
How often should you update PHP?
Check your PHP version at least twice a year, and update whenever your branch nears the end of security support.
Each PHP branch gets 2 years of active support and 2 more years of security fixes only, per the PHP supported versions page. Once security support ends, no new fixes arrive, even for serious flaws.
PHP 8.2 is a clear example of why the date matters: its security support ends on 31 December 2026, so a site still on 8.2 in November 2026 should plan its move to 8.3 or 8.4 now.
Set a repeat reminder for the month before your branch ends, and treat that date as a deadline, not a suggestion.
What mistakes should you avoid?
The biggest mistake is switching PHP on the live site without a backup, a staging check, or a way back.
- Switching PHP on the live site without a backup or a staging check first.
- Updating PHP before updating WordPress, plugins and themes.
- Picking a version your oldest plugin cannot run, instead of checking its requirements first.
- Ignoring the Site Health warning that your PHP version is outdated.
- Staying on a branch after its security support ends, such as PHP 8.2 after 31 December 2026.
- Changing PHP and several plugins at the same time, so you cannot tell which change broke the site.
Frequently asked questions
Can I update PHP from inside WordPress?
No. WordPress cannot change its own PHP version because PHP runs on your host's server, not inside WordPress. You change it in your hosting panel, such as cPanel MultiPHP Manager, SiteGround PHP Manager, MyKinsta Tools, or Hostinger PHP Configuration. WordPress only shows the version in Site Health.
Will updating PHP change how my site looks?
No, not if your theme and plugins work with the new version. PHP only runs the code behind the pages, so the design stays the same. If a page looks broken or shows an error after the switch, a plugin or theme is not compatible with that PHP version, and switching back will restore the site.
Is PHP 8.2 still safe to use?
PHP 8.2 still gets security fixes until 31 December 2026, but that date is close, so you should plan a move to PHP 8.3 or 8.4 now. After that date no new fixes arrive, even for serious flaws. Check your version in Site Health and test the move on staging before you switch the live site.
What if my host does not offer PHP 8.3 or 8.4?
Ask your host when it will offer a supported version, and whether it can move your site to a server that has one. Some older plans only offer old PHP versions, and in that case moving to a current hosting plan is the fix. Do not stay on an unsupported branch, because it gets no security fixes.
Do I need to update PHP after updating WordPress?
No, the two updates are separate. Updating WordPress does not change your PHP version, and changing PHP does not update WordPress. Update WordPress, plugins and themes first, then change PHP, so an old plugin is less likely to break on the new version.
How long does a PHP update take?
The switch itself takes a few minutes on most hosts. Kinsta says its PHP update may take up to 3 minutes. Plan more time around it: back up, update plugins, test on staging, switch the live site, and then check the home page, forms and checkout. Budget about an hour in total for a careful job.
Sources
- Requirements WordPress.org
- Site Health screen WordPress.org
- Supported Versions PHP
- Unsupported Branches PHP
- What is Managed PHP service and how to enable it? SiteGround
- WordPress Hosting - Tools Kinsta
- How to change your PHP version Hostinger
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
