How to update PHP version WordPress

How to Update Your PHP Version in WordPress

· · 14 min read ·
Written By: author avatar Joella Dunn
author avatar Joella Dunn
Joella is a writer with years of experience in WordPress. At Duplicator, she specializes in site maintenance — from basic backups to large-scale migrations. Her ultimate goal is to make sure your WordPress website is safe and ready for growth.
·
Reviewed By: reviewer avatar John Turner
reviewer avatar John Turner
John Turner is the President of Duplicator. He has over 20+ years of business and development experience and his plugins have been downloaded over 25 million times.

Ever felt like your WordPress website is too slow? It might be time for a PHP upgrade.

PHP is the engine that powers your WordPress site. And just like any engine, it needs regular maintenance to keep running smoothly. 

Updating PHP usually takes a few minutes in your hosting dashboard. WordPress recommends PHP 8.3 or higher, and PHP 8.2 stops getting security fixes on December 31, 2026.

In this post, I’ll walk you through the process of updating PHP in WordPress. You’ll learn why updating PHP matters, how to check your current PHP version, and step-by-step instructions for different hosting environments.

(Plus, what to do if the update breaks your site.)

Here are the key takeaways:

  • Update PHP regularly: WordPress recommends PHP 8.3 or higher. Newer versions improve security, speed, and compatibility with WordPress, themes, and plugins
  • Check your current version: Use WordPress Site Health (Tools » Site Health » Info tab) to see if you’re running an outdated or unsupported PHP version
  • Back up before updating: Always create a full site backup with a plugin like Duplicator to protect against potential issues
  • Update through your host: Most hosting providers offer simple PHP version management in their control panels (Bluehost, SiteGround, cPanel, etc.)
  • Test first when possible: Use a staging site to test the PHP update before applying it to your live site
  • Have a recovery plan: If the update breaks your site, switch back to your previous PHP version first, then restore your backup if the site is still broken

Table of Contents

Why Update Your PHP Version in WordPress?

Let’s face it, keeping your WordPress website up-to-date can feel like a never-ending task. But when it comes to PHP, staying current is essential for your site’s health and performance.

Here’s why updating the PHP version on your site should be on your to-do list.

Boost Your Site’s Security

Hackers love outdated software. It’s like leaving your front door wide open. Newer PHP versions come with security patches that fix vulnerabilities, keeping those cyber attacks at bay.

Speed Things Up

If your site feels slow, an old PHP version might be the culprit. Each new PHP release brings performance improvements. Upgrading PHP versions can give your site a noticeable speed boost, and we all know visitors love a fast-loading page.

Stay Compatible

WordPress, themes, and plugins are constantly evolving. They often require newer PHP versions to function properly.

WordPress itself now needs PHP 7.4 or higher, and it dropped support for PHP 7.2 and 7.3 in version 7.0. By keeping your PHP up-to-date, you ensure your site can take advantage of the latest features and improvements.

Avoid the “End of Life” Trap

PHP versions have expiration dates. Once a version reaches its “End of Life,” it stops receiving updates — even for critical security issues. PHP 8.1 and older have already reached that point, and PHP 8.2 joins them on December 31, 2026.

Running an unsupported PHP version is like driving a car with no brakes. It’s only a matter of time before something goes wrong.

How to Check Your Site’s Current PHP Version

Before you jump into updating, you need to know where you’re starting from. 

You can check your PHP version in your WordPress dashboard. Head over to Tools » Site Health and click on the Info tab.

WordPress Site Health info

Scroll down to the Server section. Look for PHP version – that’s your WordPress PHP version number.

WordPress PHP version

It’s quick, it’s easy, and you don’t need to leave your admin dashboard. Perfect for a quick check-up.

If you’re comfortable with a bit of code, you can create a new file and name it info.php. Add this single line of code:

<?php phpinfo(); ?>

Upload this file to your website’s root directory.

Access it through your browser (e.g., www.yoursite.com/info.php). Look for the PHP version at the top of the page.

Remember to delete this file after checking! It contains sensitive information about your server setup.

To see if you need to update the PHP version on your site, go to the official PHP website. Compare its currently supported versions to what your site is running on. 

Which PHP Version Should You Use?

WordPress recommends PHP 8.3 or higher. For most sites, PHP 8.4 is a good choice as long as your theme and plugins support it, since it gets security fixes through 2028.

PHP versionSecurity fixes untilWorks with
8.5December 31, 2029WordPress 6.9+
8.4December 31, 2028WordPress 6.7+
8.3December 31, 2027WordPress 6.4+
8.2December 31, 2026WordPress 6.1+
8.1 and olderEndedNot recommended

Your host may not offer every version. If you’re on WP Engine, for example, its PHP guide lists 7.4, 8.2, and 8.4.

What to Do Before Updating Your PHP Version

Updating your PHP version is important, but you need to prepare properly to avoid any nasty surprises. 

Taking these steps might feel like extra work, but trust me, they’re worth it. They can mean the difference between a smooth update and a site-breaking disaster.

Back Up Your Site

Can’t stress this enough — before you do anything, back up your site. It’s your safety net if things go sideways. 

This is where Duplicator comes in handy. With just a few clicks, you can create a complete backup of your site. This backup is easy to restore if you notice any errors after PHP updates. 

Duplicator Pro plugin

In Duplicator, go to Duplicator » Backups » Add New. In the Backup Filters section, select the Full Site backup preset, then click Create Backup.

Full site backup preset

Once your backup is built, I recommend setting it as the disaster recovery point. If anything goes wrong during the update, Duplicator can restore this backup right away.

Recovery Points need a paid Duplicator plan. On Duplicator Lite, you can still restore a backup in one click from the Backups page as long as you can reach wp-admin.

Next to the backup, hit the blue house icon.

Disaster recovery icon

Continue setting disaster recovery.

Set disaster recovery

Then, Duplicator will give you a recovery link. Save it in a safe and accessible location in case you need it.

Disaster recovery options

If you notice the PHP update causes errors on your site, paste this link into a new web browser. It’ll launch the recovery wizard, even if your entire site is crashed! 

Check Theme and Plugin Compatibility

Not all themes and plugins play nice with newer PHP versions. It’s like trying to use an old key in a new lock — sometimes it just doesn’t fit.

Before you continue with the update, check PHP compatibility information on WordPress.org. In the plugin and theme details, there’s a compatible PHP version.

WordPress.org PHP compatibility

Before PHP updates, you should also update WordPress core, all of your themes, and plugins. This way, you won’t experience any old compatibility issues. 

Test on a Staging Site

If possible, always test the PHP update on a staging site first. This allows you to view and fix any issues before you update your live site. 

Your test copy needs its own PHP setting, though. Duplicator’s one-click staging sites (Pro plan) live in a subfolder of your live site, so they normally run the same PHP version it does.

Some hosts let you set PHP for each environment or domain instead. WP Engine does this for its staging environments, and cPanel’s MultiPHP Manager does it for each domain, so you can use a subdomain.

Create a backup of your live site with Duplicator and import it onto the test copy. Then switch the test copy to the new PHP version and click through your key pages.

Import a backup with Duplicator

When everything works, update PHP on your live site. Don’t import the test copy back over your live site, since a backup doesn’t carry the PHP setting and you’d overwrite any new orders or posts.

How to Update Your PHP Version with Your Web Host

Updating your PHP version might sound technical, but many web hosts have made it easy.

While each host has its own unique interface, the steps are often similar:

  1. Log into your hosting control panel
  2. Find the PHP management section
  3. Select your desired PHP version
  4. Apply the changes

Let’s walk through the process for some popular hosting providers.

It’s important to note that newer isn’t always better. Make sure the version you choose is compatible with your WordPress installation, themes, and plugins.

Updating Your PHP Version in Bluehost

BlueHost users, log into your hosting control panel. Click on Websites, find the website you want to update, and hit the Settings button.

Bluehost site settings

Open the Settings tab.

Bluehost settings tab

Find the PHP Version section. Click on the Change button. 

Bluehost change PHP version

Choose the version of PHP you want to use, preferably the newest one your theme and plugins support.

Bluehost choose PHP version number

Hit Change and voila! Your site is using a new PHP version.

Updating Your PHP Version in Hostinger

If your site uses Hostinger, sign into hPanel. Open the Websites section, hover over your site, and click Manage site.

Hostinger manage site

Open the PHP Configuration page, select your PHP version, and click Update. The change applies to every website on your hosting plan.

Hostinger change PHP version

Updating Your PHP Version in SiteGround

SiteGround users, log into your SiteGround account.

On the home page, locate My websites and services. Here, click Manage.

SiteGround manage website

Next, open the Site Tools.

SiteGround site tools

On the left, find PHP Manager. It’ll be under the Devs section. Select the PHP Version tab and hit the pencil icon.

SiteGround PHP Manager

In the pop-up, specify that you want to change your PHP version manually. Choose the right version and confirm your choice.

SiteGround change PHP version

Updating Your PHP Version in HostGator

If your web host is HostGator, open your site’s settings.

HostGator site settings

Click on the Settings tab, where you can edit advanced settings.

HostGator settings tab

Scroll down to the PHP Version settings. You’ll see your current version. If you want a different one, hit Change.

HostGator change PHP version

Then, all you have to do is pick the version you want.

HostGator PHP version number

Updating Your PHP Version in DreamHost

For DreamHost, go to the Manage Websites page and click Manage next to your website. Open the Settings tab and click Manage next to PHP.

DreamHost manage PHP

Pick your version from the PHP Version dropdown and click Change PHP Version.

DreamHost change PHP version

Updating Your PHP Version in WP Engine

WP Engine automatically upgrades sites when a PHP version reaches end of life, and you can’t defer that upgrade. So it’s worth updating and testing on your own schedule first.

In your WP Engine control panel, go to the My Sites page. Under your website, click on the PHP version number.

WP Engine PHP version

On this page, you can preview different PHP versions to see how they’ll affect your website. 

WP Engine PHP preview

If you’re ready to upgrade PHP versions, scroll to the Updates section. Click on the PHP version number again.

WP Engine update PHP

Check the box next to Upgrade to PHP [Version]. Confirm your changes.

WP Engine change PHP version

Other Hosting Providers

If your host isn’t listed here, don’t worry. Most providers have similar processes. Look for options like “PHP Configuration,” “PHP Manager,” or “PHP Settings” in your control panel.

Can’t find it? Don’t hesitate to reach out to your host’s support team. They’re there to help, and they’ve probably guided plenty of users through this process before.

Also, keep in mind that some hosts might limit which PHP versions you can choose. If you don’t see the version you need, it might be time to contact support.

If you’re using a managed WordPress host, it may upgrade PHP for you when your version reaches end of life. Check your host’s policy so that an automatic upgrade doesn’t catch you off guard.

How to Update Your PHP Version in cPanel

If your host uses cPanel, you’re in luck. cPanel offers a straightforward way to update PHP versions, regardless of your specific host. Let’s walk through the process.

First, log into your cPanel account. Find the Software section and click on MultiPHP Manager.

cPanel MultiPHP Manager

If you have multiple domains, select the one you want to update. You’ll see a dropdown menu with available PHP versions. Choose the newest version your theme and plugins support.

cPanel change PHP version

Click on Apply to implement your new PHP version.

And there you have it! You’ve successfully updated your PHP version through cPanel.

What to Do If the PHP Update Breaks Your Site

So, you’ve updated your PHP version, and suddenly your site breaks. Don’t panic! This happens more often than you might think, and there are ways to fix it.

After a PHP update, your site might display any of these errors:

This is usually because of PHP version compatibility problems. Your new PHP version could conflict with your WordPress themes or plugins.

Start by switching back to your previous PHP version, using the same host setting you used to update. That’s usually the fastest fix, because a backup doesn’t change your server’s PHP version.

If your site is still broken after that, Duplicator is your best friend. With a pre-update backup, you can quickly restore your site to its previously working state. It’s like having a time machine for your website.

If you can still access your dashboard, find the backup you created before the update. Hit the Restore button next to it.

Restore Duplicator backup

If you’re locked out, paste the disaster recovery link that you generated earlier. Duplicator will automatically launch the recovery wizard. On Duplicator Lite, upload your backup’s archive and installer files to your site’s root folder and run the installer instead.

Disaster recovery

Follow the steps to restore your site to normal.

Once your site is back up, find the plugin or theme causing the conflict. WordPress often emails your admin address a recovery mode link after a fatal error, and that link lets you log in and deactivate the culprit. Update or replace it before you try the new PHP version again.

To avoid future scares, use Duplicator to copy your site to a test environment that can run its own PHP version. Then you can try PHP updates safely before applying them to your live site.

Frequently Asked Questions (FAQs)

How do I update my PHP version in WordPress without cPanel?

If your host doesn’t use cPanel, don’t worry. Many hosts provide custom control panels with similar functionality. Look for options like “PHP Settings” or “PHP Configuration” in your hosting dashboard. 

If you can’t find it, reach out to your host’s support team. They’ll be able to guide you through the process or even update it for you.

Should I update PHP in WordPress?

Yes, updating the PHP version on your site offers many benefits including enhanced security, improved performance, and new features. It also ensures continued compatibility with new WordPress versions and your installed plugins and themes. 

However, always check compatibility with your themes and plugins before updating. And remember to back up your site before a major change.

How do I change PHP settings in WordPress?

While you can’t directly change PHP settings within WordPress, you have a few options:

  • Create a custom php.ini: Some hosts allow you to create a custom php.ini in your site’s root directory.
  • Use .htaccess: You can add PHP directives to your .htaccess file.
  • WordPress plugins: Some plugins allow you to modify certain PHP settings.

Always back up your site before making changes to these files.

Can I update PHP from the WordPress dashboard?

No. PHP runs on your server, so you change it in your hosting control panel. WordPress only shows your current version, under Tools » Site Health » Info.

Will updating PHP break my site?

It can if a plugin or theme doesn’t support the new version. Back up first and test on a copy if you can. If something breaks, switch back to your previous PHP version.

Don’t Let Outdated PHP Slow You Down

Staying current with PHP versions in WordPress is like giving your site a regular health check-up. It keeps everything running smoothly and helps prevent issues down the road.

Whether you’re updating PHP, moving your site, or just keeping things backed up, Duplicator has got your back. Upgrade now to schedule backups and roll back bad updates with Recovery Points!

While you’re here, I think you’ll like these extra WordPress guides:

author avatar
Joella Dunn Content Writer
Joella is a writer with years of experience in WordPress. At Duplicator, she specializes in site maintenance — from basic backups to large-scale migrations. Her ultimate goal is to make sure your WordPress website is safe and ready for growth.
Our content is reader-supported. If you click on certain links we may receive a commission.

Don't Let Another Day Pass Unprotected

Every hour without proper WordPress backups puts your site at risk • Every delayed WordPress migration costs you performance and growth

Get Duplicator Now
Duplicator Plugin

Wait! Don't miss your
exclusive deal!

As a customer, you get 60% OFF

Try Duplicator free on your site — see why 1.5M+ WordPress pros trust us. But don't wait — this exclusive 60% discount is only available for a limited time.

or
Get 60% Off Duplicator Pro Now →