How to Update PHP in WordPress Safely: Step-by-Step Guide

PHP capsule safely raised on an upgrade lift for WordPress

To update PHP in WordPress, change the PHP version for your website in your hosting dashboard, then confirm it under Tools → Site Health → Info → Server. Back up the site and test the new version on staging first. WordPress can show which PHP version it uses, but the hosting server controls which version runs.

This guide covers cPanel and managed hosting, checks to make before switching, and what to do if the update breaks your site. The navigation screenshots are examples from an older interface; use your host’s currently supported versions rather than copying a version number from an image.

Security update · October 21, 2026

October 2026 security release: make sure you run a patched PHP version

On October 21, 2026, the PHP project released PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 to fix two critical vulnerabilities, CVE-2026-109618 and CVE-2026-109619. Security researchers call the pair “PHP2Shell.” Both can let an attacker run code on the server without logging in, and security vendors have reported attempts to exploit them. The flaws are in PHP itself, so updating WordPress, plugins or themes does not fix them.

Choosing a newer PHP branch is not enough on its own. A site on PHP 8.3 stays exposed until it runs 8.3.36 or later.

Check whether your site runs a patched release

  1. In the WordPress dashboard, open Tools → Site Health.
  2. Select Info and expand Server.
  3. Read the full PHP version number, including the last part (for example, 8.3.36, not just 8.3).
  4. Compare it with the table below.
WordPress Site Health Info tab with the Server section open, showing the PHP version on a demo site
Site Health on a demo site shows PHP 8.2.29, which is older than the patched 8.2.35 release.
Your PHP branchPatched release (or later)
8.58.5.12
8.48.4.27
8.38.3.36
8.28.2.35 (security support ends December 31, 2026)
8.1 or olderNo official update. Move to a supported branch.

Some hosts and Linux distributions add security fixes to their own PHP packages without changing the version number. If your number is lower than the table shows, ask your host whether the fix is installed before you assume the site is exposed.

What to ask your host

On shared and managed hosting, you usually choose only the branch, such as 8.3. The host installs the patch releases. Ask your host:

  • Have you installed the October 21, 2026 PHP security release (CVE-2026-109618 and CVE-2026-109619) for every PHP version my account can use?
  • If not, when will it be installed?
  • If your site runs PHP 8.1 or older: which supported version can I switch to, and do you provide a backported fix until then?

If you manage your own server, install the updated PHP packages from your distribution or vendor. Then restart PHP-FPM or the web server so every PHP worker loads the new version.

The PHP security advisory also lists temporary configuration changes for servers that cannot update right away. It says those changes reduce exposure but “do not make an installation safe,” and they need server-level access. For most WordPress site owners, the right step is to update or ask the host.

If your site runs PHP 8.1 or older, follow the steps below to move it to a supported branch. Back up and test first, because a branch change can break old plugins.

Want me to check and update your PHP?

I’ll check which PHP version your site runs and confirm with your host that the October 2026 security fix is installed. If you need a newer version, I test your site on it first, switch it in your hosting dashboard, check that everything works, and keep a way to roll back.

$59 for a Single Fix, paid securely online. No fix, no fee: your card is only charged once it is done.

Order a PHP update ($59)

Step-by-step guide

Which PHP version should you choose?

Choose a PHP release that still receives security fixes and is compatible with your WordPress version, theme, plugins, and hosting plan. WordPress recommends PHP 8.3 or greater. That recommendation does not mean every older plugin will work with every newer PHP release; check the requirements of your site’s components before switching.

As of October 21, 2026, PHP 8.2, 8.3, 8.4, and 8.5 remain supported by the PHP project. PHP 8.2 receives security fixes only until December 31, 2026, so consider the remaining support window when choosing a target. PHP 7.4 and PHP 8.1 have reached end of life and should not be presented as secure upgrade targets. Whichever branch you choose, make sure it runs a patched release (see the security section above).

Check the live PHP support schedule before making a change. For WordPress requirements and preparation, see the official WordPress PHP update guide.

Step 1: Check your current PHP version

  1. Sign in to the WordPress dashboard as an administrator.
  2. Open Tools → Site Health.
  3. Select Info, expand Server, and find PHP version.
  4. Record the full version number, such as 8.3.36, and the version selected in your hosting dashboard. Keep access to the hosting dashboard available in case WordPress stops loading.
Tools Option in WordPress
Open Tools in the WordPress dashboard, then choose Site Health.
Click on the Info Tab
Use the Info tab and expand Server to read the PHP version. Site Health does not change it.

Step 2: Back up and test before changing the live site

Take a fresh backup of both the database and website files. Confirm how to restore it through your host or backup tool, and keep a copy outside the live website. A files-and-database backup does not necessarily restore the server’s PHP setting.

  • Check the requirements and release notes for WordPress, your active theme, plugins, and any custom code. Update outdated components in a controlled sequence and verify the site after those changes.
  • Create a WordPress staging site that matches the live site’s configuration. Protect it from public access and prevent test emails, payments, or integrations from acting on real customers.
  • Switch only the staging environment to the proposed PHP version. If your host applies one PHP setting to several sites, ask how to isolate the test first.
  • Test important pages, the editor, login, forms, search, uploads, scheduled tasks, and any store or membership features. Check the host’s PHP error log.
  • If a theme or plugin fails, update or replace it, or ask its developer about compatibility. A compatibility scanner can help find issues, but it cannot prove that the whole site works.

When the staging checks pass, choose a quiet time for the live change. On a busy store, avoid restoring an old database over newer orders or customer activity.

Step 3: Update PHP through your hosting dashboard

Option A: Use cPanel MultiPHP Manager

If your hosting plan provides cPanel, its PHP tools may appear under Software. The host decides which versions and controls are available. MultiPHP Manager changes the version for a domain; MultiPHP INI Editor adjusts PHP settings and is a different tool.

PHP Related Options
Example PHP tools in cPanel. Open the version manager provided by your host.
  1. Sign in to your hosting account and open cPanel.
  2. Find MultiPHP Manager, using the cPanel search if needed.
  3. Select the checkbox for the correct domain. Verify that you are changing the intended live or staging environment.
  4. Choose the supported PHP version you tested, then click Apply.
  5. Wait for confirmation and check the site. If the version is inherited or the control is unavailable, consult your host before changing a setting shared by other domains.
Select Your Domain
Select the intended domain before applying a PHP version change. Interface labels vary by host.

Some hosts provide Select PHP Version or a custom PHP selector instead. Follow that host’s instructions, including any required extensions. The cPanel MultiPHP Manager documentation explains domain selection and inherited versions.

Option B: Use a managed hosting panel or contact support

Managed WordPress hosts often place the PHP selector under a site’s Settings, Tools, or Server section. Select the correct site and environment, choose the version you tested, and apply the change. Do not assume that switching staging also switches the live site.

If there is no selector, ask support to confirm the available supported versions, compatibility requirements, and rollback process. Provide your domain and requested version, and ask them to confirm when the change is complete. A WordPress plugin cannot install an unavailable PHP runtime on the hosting server.

Why this guide does not use a generic .htaccess snippet

PHP handlers differ between hosting platforms. Copying an AddHandler line from another host may have no effect or cause an error; it does not install a new PHP version. Use a host-provided control or instructions written for your exact server. Likewise, a PHP compatibility plugin checks code compatibility rather than upgrading the server.

Step 4: Verify the live website after the update

  • Return to Tools → Site Health → Info → Server and confirm that WordPress reports the target PHP version.
  • Open the homepage and several articles in a signed-out browser. Check the WordPress dashboard and editor too.
  • Test forms, search, media uploads, and business-critical features. Use a sandbox or test mode for payment tests.
  • Check PHP errors and scheduled tasks. Clear the relevant website or host caches if necessary, then repeat the checks.
  • Compare performance using the same pages and test conditions. PHP can affect server processing, but an upgrade does not guarantee a particular speed improvement. Our WordPress speed guide covers other common bottlenecks.

What to do if WordPress breaks after updating PHP

If the site displays a critical error or stops loading, reopen the hosting dashboard and switch the affected environment back to its previous working PHP version. If that option is missing, contact the host. This can restore access while you investigate the incompatible theme, plugin, extension, or custom code.

Read the host’s error log and reproduce the failure on staging. Fix the cause, retest, and then attempt the supported version again. Treat a rollback to an unsupported release as a temporary recovery measure, not a finished solution.

Restore files or the database only if those also need recovery. Confirm the backup timestamp and the effect on new content, orders, or submissions before restoring. Do not assume that restoring a WordPress backup changes the PHP version.

Did your site break after a PHP update?

I’ll find the plugin, theme or custom code that fails on the new version, then fix it or roll back safely and confirm the site works again.

$59 for a Single Fix, paid securely online. No fix, no fee: your card is only charged once it is done.

Order a fix ($59)

Frequently asked questions

Can I update PHP from the WordPress dashboard?

Usually, the change is made in the hosting dashboard or by the host’s support team. Site Health displays the version WordPress is running. Some hosts add their own controls to WordPress, but those still depend on the hosting service.

Will updating PHP delete my posts or images?

Changing the PHP runtime does not intentionally delete WordPress content. Incompatible code can stop the site working, however, which is why a backup, staging test, and rollback plan matter.

How long does a PHP update take?

Applying the setting may be quick, but the host controls the timing. Allow time for backups, compatibility checks, staging tests, and live verification. Do not schedule the change solely around how long the Apply button takes.

Do I need to use the newest PHP release immediately?

Choose a supported release that your site and host can run reliably. Review its security support end date and plan the next upgrade before that date. Newer is not a substitute for checking compatibility. Security patch releases within your branch are different: install them promptly, as with the October 2026 release that fixed CVE-2026-109618 and CVE-2026-109619.

If you would like help testing updates and keeping recovery options ready, see my WordPress maintenance service. We agree on the scope before work starts.

Related Posts

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Subscribe to our Monthly Newsletter

Get monthly updates of WordPress tips, tricks, and tutorials in your email.

Thanks. You have successfully subscribed.