How To Update PHP in WordPress: A Step-by-Step Guide

Even once you’ve got the hang of using WordPress, some of its warnings can catch you off guard. For example, what should you do when this message appears on your dashboard?

PHP Update Required error message 

“PHP Update Required” or “Recommended.” Both sound pretty serious – and what does PHP even mean?

PHP means hypertext processor. It’s an open-source programming language your WordPress website uses to run effectively.

Essentially, without updating your PHP to a newer version, your site risks:

  • Getting hacked
  • Falling prey to malware
  • Slowing down
  • Losing performance


GIPHY

Thankfully, learning how to update PHP versions in WordPress is pretty simple. With our guide, getting your site up to full power is even quicker and easier.

Skip ahead if you want to get straight to the step-by-step walkthrough.

Why Updating PHP in WordPress Is Important

Your WordPress site runs on several programming languages, and PHP is one of the most important.

Most website hosting companies, such as Siteground and WPEngine, use the latest versions of this scripting language for the best performance and to match WordPress’s requirements.

Updating to a newer version of PHP means you patch it with the latest security updates and development features. The latest code also tightens memory use and improves load times, making your site faster.

Therefore, alongside updating WordPress plugins, themes, and other features, keeping your PHP up to date is vital if you want your site’s performance to be at its best.

Let’s dig deeper into the four main reasons why you should regularly update WordPress with each new PHP upgrade:

  1. Speed
  2. Better compatibility
  3. Security
  4. New features

Speed

The newer the PHP version of your WordPress, the faster the website. Each new version relieves more memory pressure from your server, meaning it performs better.

There are plenty of ways to improve your website loading speeds, but having the latest version of PHP is probably the most important check to make.

After all, the faster the site, the better the user experience. Most people click off if your pages take over five seconds to appear!

What’s more, site speed is key to healthy SEO (search engine optimization). Google prioritizes ranking fast-loading websites in search results. That means you stand to get more visitors and keep them on-site longer to improve your chances of making sales and building revenue.

Better compatibility

Ever struggled to get certain WordPress themes, plugins, and other software to work? It could be that you’re due for a PHP update.

Updating your website’s PHP ensures it’s compatible with the latest software releases for WordPress that previous versions aren’t optimized for.

Security

Relying on outdated versions of plugins and themes puts you at risk of being hacked, and older software is often slower and less convenient to use.

Newer PHP versions have the latest security updates and features, meaning you have greater protection against the latest hacking strategies.

Running outdated PHP means hackers have a better chance of knowing how to exploit vulnerabilities in your website’s code.

Keeping your PHP updated means you avoid having to bounce back from WordPress hacks that damage your reputation and your wallet.

New features

There are also development perks that arrive with new PHP versions. For example, PHP 8.3, released in November 2023, offers new coding enhancements, such as stack overflow detection.

To the average WordPress user, these enhancements might not sound too exciting, but for coders, programmers, and advanced users, new PHP releases mean new conveniences and ways to experiment.

A new PHP release generally means your WordPress site is faster, more powerful, and more convenient than ever before.


GIPHY

How To Check Your PHP Version in WordPress

As of 2024, WordPress recommends you use at least PHP 7.4 for optimal performance and security, but always check their latest advice.

Before installing a new PHP version, check what you’re already running in your WordPress dashboard.

Login into the WordPress admin dashboard, then look for “Tools” and select “Site Health,” like so:

The Site Health page brings up general information about your website’s performance. Click “Info” to switch tabs and scroll down until you see “Server.” Click it to open a dropdown menu.

Next to “PHP version,” check what your WordPress site currently runs on. If it’s 7.4 or higher, you’re typically good to go. However, if WordPress recommends you upgrade or you simply want the best performance and security, keep following this tutorial.

You can also check your PHP version through your web host’s dashboard or the command line.

The command line gives you access to development features behind the scenes. It’s a little more technical but is useful if you can’t access your dashboard.

If you want to check your PHP this way, we advise you to check WordPress’s guide first and reach out to your host or a developer if you need guidance.

What To Do Before Updating PHP on WordPress

Before you start updating your site’s PHP, there’s a little prep work to make sure it’s safe to install and run.

Here are the four steps you need to complete.

How to update my PHP in WordPress: Prepping steps

 

Recommended stepIn brief
1. Back up your siteSave a site backup with a plugin such as UpdraftPlus and set automatic backups for the future
2. Check your server and site support your PHP versionHead to “Updates” to find your version number, and use our guide to find out if it’s compatible
3. Update your plugins, themes, and core filesCheck “Updates,” select “Update All,” and check the top-left section of your sidebar for WordPress version updates
4. Test your PHP update on a “staging” siteUse your web host’s staging solution, if available, or a plugin such as WP Staging to “clone” your site and install your PHP there to check if it works

1. Back up your site

Backing up your website means you can fall back on an older version of PHP from before you made any changes. It’s a checkpoint to use in the rare case anything goes wrong.

Ideally, you should have automatic WordPress backups ready to go – but if not, save one now through your host’s dashboard or a plugin.

For this guide, let’s use UpdraftPlus as a demonstration. But remember, many free backup plugins are available directly through WordPress if you prefer a different program.

Install the UpdraftPlus through your dashboard’s Plugin search engine. Head to “Plugins,” then “Add New,” and search for the program.

Click “Install Now” to add the plugin to your site, then click “Activate.”

Head to your dashboard to find “Settings” and then “UpdraftPlus Backups.”

On the new screen that appears, choose the tab marked “Settings” and select a storage location for where you want to store your backups. Follow the instructions for your chosen backup location – with Google Drive, for example, you might need to allow UpdraftPlus access.

Then, head back to the “Backup/Restore” tab in the UpdraftPlus settings screen in your dashboard. Click “Backup Now” to create a save point.

2. Check your server and site support your PHP version

The “Site Health” section of your dashboard should inform you which version of PHP is safe to run.

However, some PHPs don’t run on older versions of WordPress.

Check your version number by heading to the “Updates” section of your dashboard, which tells you what you need to know:

Here’s a quick breakdown of the PHP versions that run on specific WordPress versions:

WordPress versionsPHP versions supported
WP 5.0 and 5.1
  • PHP 5.2
  • PHP 5.3
  • PHP 5.4
  • PHP 5.5
  • PHP 5.6
  • PHP 7.0
  • PHP 7.1
  • PHP 7.2
  • PHP 7.3
WP 5.2
  • PHP 5.6
  • PHP 7.0
  • PHP 7.1
  • PHP 7.2
  • PHP 7.3
WP 5.3 to 5.5
  • PHP 5.6
  • PHP 7.0
  • PHP 7.1
  • PHP 7.2
  • PHP 7.3
  • PHP 7.4
WP 5.3 to 5.5
  • PHP 5.6
  • PHP 7.0
  • PHP 7.1
  • PHP 7.2
  • PHP 7.3
  • PHP 7.4
  • PHP 8.0
WP 5.9 and 6.0
  • PHP 5.6
  • PHP 7.0
  • PHP 7.1
  • PHP 7.2
  • PHP 7.3
  • PHP 7.4
  • PHP 8.0
  • PHP 8.1
WP 6.1 and 6.2
  • PHP 5.6
  • PHP 7.0
  • PHP 7.1
  • PHP 7.2
  • PHP 7.3
  • PHP 7.4
  • PHP 8.0
  • PHP 8.1
  • PHP 8.2

 

We also recommend you run WP Engine’s PHP Compatibility Checker plugin. This software tells you if there are any compatibility problems before you install a new PHP version. It advises you which plugins and themes, for example, to update ahead of time.

It’s also good to contact your web host or use their user dashboard to check if your PHP version is compatible with your server. Further down in the guide, we’ll show you how to update your PHP through some of the most popular hosts available for WordPress.

3. Update your plugins, themes, and core files

If you used the PHP Compatibility Checker already, you might know which WordPress core files and other programs need updating as a priority. However, it’s just as good to go through and update everything due for new versions before you install your PHP.

This is easy to check by returning to your WordPress dashboard’s “Updates” section. If there are any updates available, you should see a recommendation similar to this shown here in WordPress 5.6:

If you see a prompt to “Update All,” clicking it ensures all internal files and software are ready for your next PHP version.

A good extra measure is to update your WordPress version, too. Check for updates in the top-left corner of your dashboard, like so:

Then, click and follow the steps on-screen. Let the installation complete before moving to the next step.

4. Test your PHP update on a “staging” site

A “staging” site or environment is a safe copy of your site to install and test a new PHP version to see how it functions. We suggest trying this to see if there are any compatibility issues before you update PHP for real.

You can use several plugins, such as WP Stagecoach and WP Staging, to create staging environments from scratch.

Your host might have a staging process of their own you can follow. In this case, we recommend you follow their instructions. For example, WPEngine, Siteground, and Kinsta let you stage sites and test PHP versions before going live.

Here, let’s use WP Staging as an example. Search for the plugin through your dashboard’s “Plugins” and “Add New” feature, install and activate the program, and look for the “WP Staging” tab on your dashboard.

After clicking “WP Staging,” select “Create New Staging” or “Create Staging Site” in the window that appears. The window may appear differently depending on your WordPress version.

Then, name your staging site and click “Start Cloning.”

Once staging is complete, follow the prompt and log in as normal. You now have access to your cloned “test” site, and you can tell you’re using the clone when the top bar of your dashboard is orange.

You now need to update your PHP on your staging site, so skip ahead to learn how to do that.

Once updated, review your cloned website. Do the design and navigation elements look and work as they should? Can you still use forms, links, and buttons? How does it look on mobile devices?

We also recommend you test the speed of your cloned site via GTmetrix. Remember, load times any slower than five seconds turn most web visitors away.

If you note anything concerning while assessing your staged site, contact your host or a developer for guidance.

The premium version of WP Staging lets you push your site live after staging, meaning you don’t have to upgrade PHP all over again.

Updating PHP in WordPress: 3 Options

After all these checks, it’s time to push your new PHP live and enjoy a faster, more reliable WordPress site.

Here are three ways to get your WordPress website’s PHP updated.

1. Update via your website hosting provider

The quickest and easiest way to update PHP for WordPress sites is through your web host.

However, different hosts have different updating processes. That’s why we list six of the most popular WordPress hosting providers with quick walkthroughs below to get you up to speed:

  1. WPEngine
  2. Siteground
  3. Kinsta
  4. GoDaddy
  5. HostGator
  6. Bluehost

If your host isn’t listed here or you want to know how to update PHP in WordPress via cPanel, skip to the next step.

WPEngine

WPEngine typically retires old versions of PHP that no longer serve WordPress. However, it’s still wise to update manually if WordPress recommends you take action.

To update your PHP via WPEngine, start by heading to your User Portal and opening “Sites,” then selecting the “environment name” (e.g., your live or staging site).

Underneath “Updates,” find “PHP” and click “PHP Version number.” Then, choose a new PHP version and click “Confirm.”

This takes a short time, and you receive a confirmation when your PHP is live. Check your staging or live site dashboard.

Siteground

Siteground offers a “Managed PHP” service that automatically upgrades you to the latest stable version. It’s on by default, but you can update your PHP manually.

Log into your Siteground dashboard and select “Websites.” Then, select “Site Tools” for the website you’d like to update.

Then, choose “DEVS,” then “PHP Manager” from the left.

Click the “Edit” or “pencil” icon that’s next to the version number, and in the popup, select “Change PHP version manually” and the version to which you wish to update.

Then, click “Confirm” – the PHP update is live.

Kinsta

Update PHP on WordPress with Kinsta by logging into the MyKinsta dashboard and looking for “WordPress Sites.” Then, select the name of your site and select “Tools.”

On the page that appears, there is a section for “PHP engine.” In the dropdown box reading “Modify,” click the PHP version you want to upgrade to.

You then receive a warning message that lets you know what to expect and how long the process is likely to take. Read the message carefully, and once you agree to proceed, click “Modify PHP version.”

Your PHP now restarts, meaning you might need to wait a few moments before your WordPress dashboard reactivates.

Your website should reappear as expected when it returns, with the new PHP version installed.

GoDaddy

To start updating your PHP via GoDaddy, log into your account via the web and head to the “product page.”

In “My Products,” choose “Manage All” next to the “Managed WordPress” option. Choose the website you want to update PHP for by clicking the “three dots” button and selecting “Settings.”

 

The next screen tells you your current PHP version. Click “Change” next to the number.

 

 

On the next page, choose your preferred new version from the dropdown. Then, click “Save Changes.”

 

HostGator

HostGator runs PHP updates through a program called cPanel, which we cover in more detail in option two. For this step, let’s follow HostGator’s version of the software.

Log into your HostGator Customer Portal and select “Hosting” from the left-hand panel.

Head down to “Quick Links” if you have a single hosting package, or click “Manage” next to the hosting package you want to edit if you have several, and then find “Quick Links.”

Click “cPanel” in “Quick Links,” and in the next window, find “Software” before clicking “MultiPHP Manager.”

Choose the domain you’d like to upgrade PHP by checking the left-hand box, then select the PHP version from the dropdown box to the right. Then, click “Apply.”

Bluehost

Bluehost’s process is almost identical to HostGator’s, as both use embedded versions of cPanel in their frontend software.

Log into your Bluehost control panel and click “Hosting” in the left-hand menu, then scroll down until you see “cPanel” under “Quick Links.”

Scroll down until you see “Software,” then select “MultiPHP Manager.” Then, select your preferred PHP version in the dropdown box at the right and click “Apply.”

There’s a slightly different process to follow if you run a Bluerock account through Bluehost. Instead, log into your control panel, then click “Advanced.” “MultiPHP Manager” appears under “SOFTWARE.”

Check the box next to the site you want to update, select the PHP version you want in the dropdown, and then click “Apply.”

2. Update manually through cPanel

If you use an alternative host, such as Namecheap that isn’t listed above, you need to use cPanel externally.

Once you’ve registered a cPanel account, enter your website’s address into your browser and add “/cpanel” to the end. Navigate to this address and log into cPanel.

In cPanel, scroll down to “Software” and click “Select PHP Version.”

Click on the dropdown button next to your PHP version, and choose the new version you want to update to. Then, click “Apply” to upgrade immediately.

If you can’t find “Select PHP Version,” search for “MultiPHP Manager,” click, and open up the list of domains you have available.

Then, select the domain you want to update the PHP for (i.e., your website), and select the PHP version you want to upgrade to. Click “Apply” for changes to take effect.

3. Contact an expert for help

We get it. Managing and updating your website takes a lot of time and effort – and if you don’t feel comfortable handling your PHP updates yourself or simply don’t have the time, it’s always worth asking for help.

Hosting providers help with many PHP issues, including automatic and manual upgrades.

If the steps to update your PHP through your host’s dashboard haven’t worked so far, or you just want to update the PHP version in WordPress without cPanel, contact your provider directly.

For example, through services such as Siteground, you can log into your user dashboard and raise a trouble ticket, or you can try to speak to an expert via live chat or phone if available.

Alternatively, a better (and faster option) is to raise a PHP update request with a StateWP developer through Proto, our WordPress management dashboard, for expert support within 24 hours.

StateWP aims to fix most problems, including PHP updates, within a single day of users raising service requests.

Once you log into Proto with an account, head to “Service Requests” and then select “Submit a Request.”

Proto service request screen for WordPress maintenance

Then, fill out your request with as much detail about your PHP concerns as possible. Send the request and track the status of the fix through Proto.

What To Do After Your WordPress PHP Update

Provided you followed our steps carefully, there’s no reason why a PHP update for WordPress should cause any harm to your website. But be ready to run some tests!


GIPHY

We always recommend you test your site via staging and ensure you review all its features before going live.

Ask others to test your website, too. Does it respond as they’d expect? Use different browsers and devices where possible.

We also recommend you switch on automatic PHP updates. Some hosts provide this as standard; however, WordPress might occasionally advise you to update your site’s PHP manually.

Regardless, it’s worthwhile keeping this guide on hand, and experts are on standby if you need help learning how to fix PHP errors in WordPress in the future.

How To Update PHP in WordPress: Mission Accomplished

You need to update your WordPress PHP regularly to keep your visitors happy, engaged, and secure.

What’s more, a WordPress site running a recommended PHP version is operating at peak performance. There’s no excuse to let your site and all its plugins fall into obsolescence.

At least, with our tips and tricks in this guide, there isn’t. You can update your PHP through your web host or cPanel in minutes.

In fact, calling a StateWP developer to solve your PHP problems is even more efficient. It also pays to have expert help through Proto if you need guidance with your PHP in the future.

Now that you’re clear on how to update PHP in WordPress, we recommend looking at our hassle-free website maintenance guide for more tips on how to boost WordPress performance.

And remember, although PHP protects you from cyberattacks and slowdowns, you still need extra protection – read our guide to the best web application firewalls available for your site.

x