How to Update the PHP Version in WordPress (Safely)

To update the PHP version in WordPress, you change it in your hosting control panel, not inside WordPress itself. On Hostinger, open Websites → Dashboard for your site, go to PHP Configuration, choose the version and click Update. On cPanel hosts, open MultiPHP Manager, tick your domain, pick the version and click Apply. Before you switch, check your current version under Tools → Site Health → Info → Server, make sure your plugins and theme support the new version, and take a backup. WordPress recommends PHP 8.3 or newer.

Below: which version to choose, each step in detail, what to do if the site breaks, and why the version sometimes doesn’t seem to change.

Title card: How to update the PHP version in WordPress, with WordPress's recommendation of PHP 8.3 or newer

How I worked this out: this site, harshilbarot.com, runs WordPress 7.1.3 on Hostinger. On 28 October 2026 I read its PHP version in Site Health and listed the minimum PHP version that each active plugin and the theme declares. I did not switch PHP versions for this guide, and I could not capture the Hostinger control panel (it sits behind a login), so the hosting-panel steps come from Hostinger’s and cPanel’s own documentation and are shown as a labelled diagram, not screenshots. WordPress requirements and behaviour come from WordPress.org documentation and the WordPress core source code, and PHP support dates from php.net, all checked on 28 October 2026. This guide has no affiliate links.

Key takeaways

  • WordPress recommends PHP 8.3 or newer. It still runs on 7.4, but WordPress.org warns those older versions are end of life.
  • On 28 October 2026, PHP 8.4 and 8.5 were in active support, 8.3 and 8.2 received security fixes only (8.2 until 31 December 2026), and 8.1 and older were end of life.
  • Check your plugins’ and theme’s “Requires PHP” values and back up before switching.
  • On Hostinger, the PHP version applies to every website on the hosting plan (except AI Builder sites). Moving up from a version it no longer offers (8.1 or older) is one-way once you log out.
  • If the version won’t change, look for an .htaccess handler that overrides it, and remember that php -v over SSH shows the plan’s version, not your site’s.
Table of Contents
  1. 1Which PHP Version Should WordPress Use?
  2. 2Step 1: Check Your Current PHP Version
  3. 3Step 2: Check That Your Plugins and Theme Support It
  4. 4Step 3: Back Up, and Test on Staging if You Can
  5. 5Step 4: Change the PHP Version in Your Hosting Panel
  6. Hostinger (hPanel)
  7. cPanel (MultiPHP Manager)
  8. Other hosts
  9. 6Step 5: Test Your Site After the Change
  10. 7If Your Site Breaks After a PHP Update
  11. 8PHP Version Not Changing? Check These
  12. 9Frequently Asked Questions
  13. What PHP version does WordPress recommend?
  14. Can I update PHP from the WordPress dashboard?
  15. Will updating PHP break my WordPress site?
  16. How do I change the PHP version on Hostinger?
  17. Why is my PHP version not changing?
  18. Is PHP 8.5 safe to use with WordPress?

Which PHP Version Should WordPress Use?

WordPress.org’s requirements page says: “To run WordPress, it’s recommended your host supports: PHP version 8.3 or greater.” It adds that WordPress “also works with PHP 7.4+”, but that those versions “have reached their official End Of Life and may expose your site to security vulnerabilities.” WordPress’s core handbook lists WordPress 7.0 and 7.1 as supporting PHP 7.4 through 8.5; 7.0 dropped PHP 7.2 and 7.3.

What matters for security is whether PHP itself still gets fixes. This is php.net’s schedule as of 28 October 2026:

PHP versionStatus on 28 Oct 2026Security fixes until
8.5Active support31 Dec 2029
8.4Active support (until 31 Dec 2026)31 Dec 2028
8.3Security fixes only31 Dec 2027
8.2Security fixes only31 Dec 2026
8.1End of lifeEnded 31 Dec 2025
7.4End of lifeEnded 28 Nov 2022
Dates from php.net’s Supported Versions and end-of-life pages, checked 28 October 2026; the status column is my reading of those dates on that day.

My recommendation: run at least PHP 8.3, and use 8.4 or 8.5 if your plugins and theme support them, because those get bug fixes as well as security fixes. If you are on 8.2, plan the move now, since its security support ends on 31 December 2026. Hostinger says the same in its help centre: “PHP 8.2 stops receiving security fixes on December 31, 2026.”

Workflow: check version, check plugin Requires PHP, back up, test on staging, switch in the host panel, test the site, switch back if it breaks

Step 1: Check Your Current PHP Version

In WordPress, go to Tools → Site Health, open the Info tab, expand Server and find PHP version. The Status tab also runs a PHP check. On this site it passed:

WordPress Site Health Status on harshilbarot.com: Your site is running a recommended version of PHP (8.5.12); the minimum recommended version of PHP is 8.3
Tools → Site Health → Status on this site, 28 October 2026.

If your version is old, WordPress shows a warning instead, such as “Your site is running on an older version of PHP” or, for unsupported versions, “Your site is running on an outdated version of PHP”, and the dashboard may show a PHP Update Recommended or PHP Update Required box. On Hostinger you can also check from the control panel: Websites → Dashboard, then search for PHP Info in the sidebar.

Check the dates yourself: Don’t rely on the Site Health badge alone. On 28 October 2026 WordPress’s PHP check service still rated PHP 8.1 as secure, although php.net lists 8.1 as end of life since 31 December 2025. So on PHP 8.1, Site Health shows only the milder “older version of PHP … which should be updated” notice, not the “does not receive security updates” warning. Compare your version with php.net’s dates in the table above.

One thing I noticed while researching this guide: this site’s PHP version read 8.5.11 during a security check on 25 October 2026 and 8.5.12 on 28 October, and I hadn’t changed anything. Hostinger’s help page says it “applies PHP patch releases automatically, so you only choose the PHP version, not a specific patch”. That fits what I saw, although I didn’t watch the update happen.

Step 2: Check That Your Plugins and Theme Support It

Plugins and themes can declare the oldest PHP version they work with in a Requires PHP header (in the plugin’s main file, or the theme’s style.css). Here is what this site’s active plugins and theme declared on 28 October 2026:

Plugin or themeRequires PHP
Hostinger Tools 3.0.808.1
HB Core 1.6.10, Site Kit by Google 1.190.0, GeneratePress 3.6.1 (theme)7.4
GenerateBlocks 2.5.0, GP Premium 2.5.67.2
Wordfence Security 9.0.27.0
LiteSpeed Cache 7.9.2, Rank Math SEO 1.0.280, Rank Math SEO PRO 3.0.124, HB Affiliate Links 1.0.3Not declared
Read from this site’s WordPress REST API (plugins and themes endpoints), 28 October 2026.

So the highest minimum here is 8.1, well below the 8.5 the site runs. But a minimum is not a promise that a plugin works on the newest PHP. Before a big jump, check each plugin’s changelog for notes on the version you’re moving to, and test on a staging copy.

If PHP is too old for a plugin, WordPress tells you. It refuses to activate it (“Current PHP version … does not meet minimum requirements”), and the Updates screen says a new version “does not work with your version of PHP”. WordPress also skips automatic updates in that case. So an old PHP version can quietly stop your plugins from updating, which is another reason to move up.

Skip the old checker plugin: WordPress.org’s “update PHP” page still suggests the PHP Compatibility Checker plugin, but that plugin’s own page says it “is no longer actively maintained” and checks compatibility only “up to PHP 8.0”. Don’t rely on it for PHP 8.3, 8.4 or 8.5; use a staging test instead.

Step 3: Back Up, and Test on Staging if You Can

WordPress.org is honest about the risk: “Updating your PHP version should not be a problem, but we can’t guarantee that it’s not.” So make a backup that includes both your files and your database. On Hostinger: Files → Backups, then Generate new backup. Update WordPress, your theme and your plugins first too, as WordPress.org advises.

If your host offers staging, test there first. Hostinger’s tutorial notes that when a staging site runs on a subdomain, you can change the PHP version for that subdomain only and test it without touching the live site. Hostinger sets a subdomain’s version with the .htaccess handler shown further down, which “doesn’t include PHP extensions and options”, so a clean staging test is a good sign rather than a guarantee.

Turn on error logging now, before you switch. Hostinger says errors “will start being registered from the moment you enable error logging onward”, so if you wait until something breaks, the first errors are lost.

Step 4: Change the PHP Version in Your Hosting Panel

Diagram of where to change PHP: Hostinger hPanel Websites, Dashboard, PHP Configuration, Update; cPanel MultiPHP Manager, select domain, PHP Version, Apply
A diagram based on Hostinger’s and cPanel’s documentation, not a screenshot.

Hostinger (hPanel)

These steps are for Hostinger’s hosting plans; on a Hostinger VPS you update PHP on the server yourself.

  1. Go to Websites and click Dashboard next to your site.
  2. Open PHP Configuration (Hostinger’s tutorial lists it under Advanced).
  3. Select the PHP version and click Update; the tutorial also mentions a Confirm step.
  4. Wait a few minutes: Hostinger says the version “will be updated within a couple of minutes.”

Know these Hostinger rules before you click:

  • It changes every site on the plan. “The selected version will apply to all the websites added to your hosting plan (except for websites created using Hostinger AI Builder).”
  • Only PHP 8.2 to 8.5 can be selected; versions below 8.2 are no longer available, and new websites get 8.3 by default.
  • Moving up from 8.1 or older is one-way. For existing websites on older PHP versions, Hostinger says you can upgrade, but downgrading “is not possible (except within the same login session if an issue occurs)”. Its help page doesn’t say whether you can later move back between 8.2 and 8.5, so test your site straight after the change, before you log out.

cPanel (MultiPHP Manager)

  1. Open MultiPHP Manager in cPanel.
  2. Select the checkbox for your domain.
  3. Choose the version from the PHP Version menu and click Apply.

If the version you want isn’t listed, cPanel’s docs say it is “either not installed on the server or is not available for your account”, so ask your host. Some hosts also hide MultiPHP Manager entirely. The inherit option means the domain uses the server’s default version.

Other hosts

Most control panels have a similar setting, often called PHP version, PHP Configuration or PHP Manager. I haven’t checked other hosts’ panels for this guide, so search your host’s help centre for “change PHP version” or ask support. Managed WordPress hosts may handle PHP versions for you; my best managed WordPress hosting guide covers some of them.

Step 5: Test Your Site After the Change

  1. Open your homepage and a few key pages in a private window (logged out).
  2. Log in, open the dashboard, edit a post and save it.
  3. Test anything that takes input: contact forms, search, checkout.
  4. On Hostinger, repeat these checks for every website on the plan, because the new version applies to all of them.
  5. Re-check Tools → Site Health to confirm the new version is showing.
  6. Look at the error log. On Hostinger it’s in the .logs folder, in a file named error_log_ followed by your domain; Hostinger says it records PHP warnings, deprecation notices and notices once error logging is on (see Step 3).

On a staging copy you can also turn on WordPress debugging. Open wp-config.php, find the line define( 'WP_DEBUG', false ); and replace it with the three lines below, keeping them above the line that says “That’s all, stop editing!” (WordPress’s debugging guide says they must go before it). Don’t add a second WP_DEBUG line: a PHP constant keeps its first value, so debugging would stay off (I checked this on PHP 8.4). If your file has no WP_DEBUG line, just add the three lines there. WordPress then writes errors, including deprecated-function notices, to /wp-content/debug.log:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

Turn debugging off again when you’re done. WordPress’s own guide describes WP_DEBUG as a setting for development copies of a site.

If Your Site Breaks After a PHP Update

The usual sign is the message “There has been a critical error on this website.” WordPress’s Recovery Mode (built in since version 5.2) can catch a fatal error during a normal page load and email your admin address a special login link, with the subject “Your Site is Experiencing a Technical Issue”. Through that link, the faulty plugin or theme is paused “just for your admin session”, so you can log in and deactivate or update it, then click Exit Recovery Mode.

  • Switch back first. Hostinger’s advice is to “switch back to the previous PHP version first to restore the site while you investigate”. If you moved up from a version Hostinger no longer offers (8.1 or older), it only allows that switch back within the same login session, which is why you should test right away.
  • No recovery email? WordPress.org notes it can land in spam or be blocked. You can deactivate plugins by renaming their folders in wp-content/plugins over FTP or the file manager.
  • Find the culprit in the error log, update or replace it, then try the newer PHP version again.
  • Restore your backup if nothing else works. A backup doesn’t change the PHP version, so WordPress.org advises asking your host “to restore the previous version of PHP you had running” first, then restoring the backup.

PHP Version Not Changing? Check These

What you seeLikely causeFix
Site still shows the old versionAn .htaccess handler in that folder overrides the plan’s versionRemove or update the handler (see below)
php -v over SSH shows a different versionOn Hostinger, it shows the plan’s version, not the site’sCheck in Site Health or PHP Info instead
Version number didn’t change after a security fixHostinger built the php2shell security fix into the version you already run (all plans except VPS)Check the Build Date in PHP Info: Hostinger says October 21, 2026 or later means the fix is in
Changed a minute ago, nothing yetThe change takes a couple of minutesWait, then re-check Site Health
Can’t change it at allSite built with Hostinger AI Builder, or the version isn’t offeredAI Builder sites are excluded; on cPanel ask your host
Causes from Hostinger’s help pages on changing and checking PHP versions and on per-folder PHP versions, checked 28 October 2026.

On Hostinger, a block like this at the top of an .htaccess file sets the PHP version for that folder or subdomain, overriding the plan’s version (this is Hostinger’s own example, which forces PHP 7.4; Hostinger recommends “only PHP version 8.2 or higher”):

<FilesMatch ".(php4|php5|php3|php2|php|phtml)$">
    SetHandler application/x-lsphp74
</FilesMatch>

If you find one that you didn’t add on purpose, remove it or change the number (Hostinger’s handlers run from x-lsphp73 to x-lsphp85). Hostinger warns that this method “doesn’t include PHP extensions and options” and doesn’t recommend it for changing versions, so prefer the PHP Configuration page. On cPanel servers, the version is also written to .htaccess: with inherit, Apache uses the version in the first .htaccess file it finds in the domain’s folders, and an invalid version there makes it fall back to the server default. cPanel recommends setting the version only through MultiPHP Manager.

Speed: A newer PHP version is one part of a fast WordPress site. My how to reduce TTFB in WordPress guide puts page caching and a CDN first, then PHP and object caching, and times each layer on this site; my LiteSpeed Cache settings guide shows the cache setup.
Checklist for a PHP update in WordPress: before, during and after the change, plus fixes when the PHP version is not changing

The checklist in text: before the change, check your current version in Site Health, check each plugin’s and the theme’s Requires PHP, update everything, back up files and database, and turn on error logging; test on staging if you can. Change the version in your hosting panel (Hostinger: PHP Configuration; cPanel: MultiPHP Manager) and wait a couple of minutes. After the change, test pages logged out, the dashboard and forms, and read the error log; if something breaks, switch back straight away (on Hostinger, a move back to 8.1 or older works only in the same login session). If the version won’t change, look for an .htaccess handler, don’t trust php -v over SSH, and check the Build Date for patch fixes.

Choosing a host? My Hostinger review covers Hostinger’s plans, and my best web hosting services list compares other hosts.

Frequently Asked Questions

What PHP version does WordPress recommend?

PHP 8.3 or greater, according to WordPress.org’s requirements page (checked 28 October 2026). WordPress still works with PHP 7.4 or newer, but versions before 8.2 no longer get security fixes from php.net.

Can I update PHP from the WordPress dashboard?

No. WordPress shows your PHP version in Tools → Site Health → Info → Server, but the version is set by your web host, so you change it in your hosting control panel or ask your host.

Will updating PHP break my WordPress site?

Usually not, but it can if a plugin or theme isn’t compatible. WordPress.org says it can’t guarantee there will be no problems, so back up first, check each plugin’s Requires PHP value and test on staging when you can.

How do I change the PHP version on Hostinger?

Go to Websites, click Dashboard next to your site, open PHP Configuration, choose the version and click Update. The change applies to every website on the plan and takes a couple of minutes.

Why is my PHP version not changing?

The most common causes are an .htaccess handler that overrides the version for that folder, checking with php -v over SSH (which shows the plan’s version on Hostinger), or not waiting the couple of minutes the change takes.

Is PHP 8.5 safe to use with WordPress?

WordPress’s core handbook lists PHP 8.5 as supported by WordPress 6.9 and later, and php.net gives it active support until 31 December 2027. This site runs WordPress 7.1.3 on PHP 8.5.12. Check that your own plugins support it first.

Harshil Barot
About the author
Digital Marketing Strategist & SEO Specialist

Harshil Barot is a digital marketing strategist focused on SEO, website growth and lead generation. He has built websites since 2012 and provided digital marketing services since 2016. His reviews of web hosting, WordPress, SEO and AI tools state whether they draw on personal use, hands-on testing or editorial research.

Share

Leave a Comment