---
title: "WordPress Maintenance: How to Upgrade PHP Version"
date: 2023-11-21
author: "Tassos Antoniou"
featured_image: "https://pressidium.com/wp-content/uploads/2023/10/wordpress-maintenance-how-to-upgrade-the-php-version-blog-post.png"
categories:
  - name: "Tutorials"
    url: "/blog/category/tutorials.md"
tags:
  - name: "newsletter"
    url: "/blog/tag/newsletter2311.md"
  - name: "Performance-Hosting"
    url: "/blog/tag/performance-hosting.md"
url: "https://pressidium.com/blog/wordpress-maintenance-how-to-upgrade-php-version/"
---

# WordPress Maintenance: How to Upgrade PHP Version

Updating PHP is a proactive step that helps ensure your WordPress website remains secure, functional, and aligned with industry standards and best practices. In this article, we’ll explore why it’s imperative to keep your PHP version current. We’ll examine the benefits that come with embracing the latest PHP advancements and guide you through the process of checking your PHP version and safely upgrading it.

 **Table of Contents** 

 [ Why Should You Update PHP? ](#why-should-you-update-php)

 [ How to Check Which PHP Version My WordPress Site Uses? ](#how-to-check-which-php-version-my-wordpress-site-uses)

 [ How to Upgrade PHP in WordPress ](#how-to-upgrade-php-in-wordpress)

 [ Upgrading PHP as a Pressidium Customer ](#upgrading-php-as-a-pressidium-customer)

 [ Conclusion ](#conclusion) 









At the time of writing this article, the [stable version available for PHP](https://www.php.net/downloads.php#v8.4.7) is 8.4. While WordPress still supports PHP v7.4, it strongly recommends using **PHP 8.1 or higher** for better performance and security. [Support for version 8.0 officially ended](https://php.watch/versions/8.0/releases) on **December 6, 2021**, and no further updates will be provided by the PHP team.

## **Why Should You Update PHP?**

We cannot stress enough how beneficial it is to update PHP to the latest stable version. An outdated PHP version can significantly affect a website’s functionality and security on multiple levels.

Let’s see how updating your PHP improves not only the website itself, but everything that surrounds its well-being.

### **Security and Performance**

As PHP evolves, its developers **actively patch security issues** and release updates.

Running an outdated PHP version exposes your website to **potential security risks and hacking** attempts. Hackers actively target websites running on old PHP versions because they can take advantage of well-known and well-documented vulnerabilities.

Also, when a vulnerability is discovered in an outdated PHP version, it may not receive security patches or updates from the PHP development community immediately, or at all, if it’s [End of Life (EOL)](https://www.php.net/eol.php). This has the potential to result in unauthorized access, data breaches, defacement, and various other security violations.

Furthermore, PHP updates serve a dual purpose, as they not only tackle security concerns but also rectify related bugs and glitches. These bug fixes can contribute to enhancing the overall **stability and reliability of your website.**

Another thing is that newer PHP versions often come with **performance improvements and optimizations**. Upgrading has the potential to enhance website loading speed and overall performance, thereby enhancing the user experience.

### **Feature Enhancements and WordPress Compatibility**

Newer versions also introduce useful features, improved syntax, and other capabilities. Not updating to the latest version can make it harder to create and maintain a modern, feature-packed website.

Keeping PHP up-to-date ensures that **your website remains compatible** with the latest themes, plugins, and libraries available for WordPress.

WordPress themes and plugins utilize newer PHP features to improve their performance or add new capabilities. When you update your PHP version, you ensure that these plugins and themes function correctly. If your PHP version is outdated, you may encounter compatibility issues, such as features not working as intended or even errors and crashes.

### **Better Debugging**

Debugging issues with an outdated PHP version can indeed present greater challenges. Modern developers often depend on the latest tools and error-reporting features to diagnose and resolve issues efficiently.

Current PHP versions come with better tools for finding and fixing issues in your code, making it **simpler to spot and solve problems** in your website’s programming. Staying current with PHP ensures that you have **access to the best resources** for effective debugging, ultimately saving time and streamlining the troubleshooting process.

### **Compliance Requirements**

Depending on your website’s purpose and your location, using outdated software may put you at odds with legal and regulatory requirements.

Many countries and regions have strict data protection regulations (e.g., GDPR in Europe, CCPA in California) that require organizations to maintain the security of personal data. Using an outdated PHP version can put **your compliance with these regulations at risk.**

Staying up-to-date can help you comply with relevant laws and industry standards and avoid compliance issues and legal consequences.

### **Hosting Provider Support**

Hosting providers commonly update their PHP versions and stop supporting older versions because they need to ensure their server stability. That forces you in a way to update PHP on your website as well, if you want to continue using their services.

Otherwise, your website could become **inaccessible**.

Maintaining an older PHP version can become increasingly challenging as time goes on. Developers and the PHP community primarily focus on supporting the latest versions. Using outdated PHP can lead to difficulties in finding support and resources for your website.

💡 **Free Performance PDFs:** Before upgrading, make sure your server setup and hosting environment are ready. Download our [Server-Side Optimization Checklist](https://pressidium.com/wp-content/uploads/2025/10/cheatsheet-server-side-performance-optimization.pdf) and [How to Choose the Right Hosting Provider](https://pressidium.com/wp-content/uploads/2025/10/cheatsheet-how-to-choose-provider.pdf).  
These concise references will help you verify hosting compatibility, optimize backend performance, and ensure your PHP upgrade delivers real speed and stability improvements.

## **How to Check Which PHP Version** My WordPress Site Uses?

There are several methods you can use to check which PHP version you are using. Here are a few common ways:

### **Check Your Hosting Control Panel**

If you use a hosting provider that offers a control panel (e.g., cPanel, Plesk), check their documentation to see where you can find information about your PHP version.

In **Plesk** for example, you can expand your website’s tab and see the PHP version right in the **Dashboard -&gt; Dev Tools**

![Check PHP version - Plesk Control Panel](https://pressidium.com/wp-content/uploads/2023/09/plesk-php-info.png)    Once you’ve determined the PHP version you’re using, it’s a good idea to ensure that it meets the minimum requirements for your website and consider upgrading for security and performance reasons.

### **Use the PHP Function `phpinfo()`**

If you have [FTP access](https://help.pressidium.com/en/articles/1851094-access-your-wordpress-site-via-sftp) to your website’s files, create a new PHP file in a directory you can access and add the following code to the file:

```
<?php
phpinfo();
?>
```

Save the file and access it through a web browser. If, for example, the file is in your root directory, you should visit http://YOURDOMAIN.com/FILENAME.php.

![Check WordPress PHP Version before Upgrading - phpinfo()](https://pressidium.com/wp-content/uploads/2023/09/php-info.png)    There, you will see a page with detailed information about your PHP configuration, including the PHP version at the top.

### **Use the Display PHP Version WordPress plug-in**

If you can access the WordPress admin area, you can install a plugin like “[Display PHP Version](https://wordpress.org/plugins/display-php-version/)” to get information about your PHP version.

![](https://pressidium.com/wp-content/uploads/2023/09/display-php-version-wordpress-plugin.png)    After you install and activate the Display PHP Version plugin, you can go to your WordPress admin page and look next to your WordPress version to see what PHP version is running at a glance.

### **Contacting Your Hosting Provider**

If you’re unsure about performing any of the above, you’d better contact your hosting provider’s support. They should be able to provide you with information about the PHP version you are using.

In a Managed WordPress Hosting service like [Pressidium](https://pressidium.com/), there is always a customer portal that can give you this information at your fingertips.

In the [Pressidium Dashboard](https://pressidium.com/dashboard/), the PHP version is displayed under the **Overview tab** of any website you are managing.

![](https://pressidium.com/wp-content/uploads/2023/11/dashboard-show-php-version.png)    If you run an **outdated PHP version**, we will notify you directly through your dashboard.



![Pressidium Dashboard - Check WordPress PHP Version before Upgrading](https://pressidium.com/wp-content/uploads/2023/11/dashboard-outdated-php-notification.png)    



Now let’s take a close look at the process of updating your PHP version.

## How to Upgrade PHP in WordPress

There are some steps you need to follow before you start upgrading in order to make the process as smooth as possible.

### **Preparing for PHP Upgrade**

Now that you’ve checked what PHP version your website uses, you are ready to resume the rest of your preparation to upgrade.

Before upgrading PHP, **make sure that your WordPress version, themes, plugins, and custom code are compatible** with the new PHP version you plan to install.

Visit your theme’s website. Theme developers usually mention PHP compatibility in their theme documentation or release notes.

Visit each plugin’s website or repository as well. Look for information regarding PHP compatibility in the plugin’s documentation or the download page.

Check if your current WordPress core version is compatible with the PHP version you plan to upgrade to. WordPress often provides information about PHP compatibility in its release notes.

Analyze your custom code for syntax errors, functions that the new version deprecates, and other issues. There are code analysis tools that can help you with this, like [PHPStan](https://phpstan.org/try) and [PHP\_CodeSniffer](https://pear.php.net/package/php_codesniffer/).

**Create a full backup** of your WordPress website, including the database and files. You can use a [backup plugin](https://pressidium.com/blog/wordpress-backup-plugins-comparison/) or your hosting [provider’s backup tools](https://pressidium.com/blog/backing-up-your-wordpress-site-the-pressidium-approach/) for this purpose. This ensures that you can restore your website in case something goes wrong during the upgrade.

If possible, **set up a** [**staging environment**](https://help.pressidium.com/en/articles/1674852-initialize-your-staging-environment) that mirrors your live website. This allows you to test the PHP upgrade without affecting your live site. You can do this on a subdomain or a separate directory on your hosting server.

Draft a **list of URLs/pages** or use cases you can review/check after upgrading to verify that they function as intended. This might be adding products to a cart, signing up for a course, carrying out common administrative work in the WordPress admin interface, or visiting popular pages based on traffic/user engagement.

Pro Tip: If you upgrade across several PHP versions, you might consider performing PHP version upgrades in sequence i.e. upgrade from PHP 7.4 to PHP 8.0, then to PHP 8.1, then to PHP 8.2 etc. This will help you isolate and pinpoint any specific issues with each version.

Another good idea is to review the **official PHP migration guides** and remember to check backward compatibility before upgrading:

- Migrating from PHP 7.1.x to PHP 7.2.x  
    (<https://www.php.net/manual/en/migration72.php>)
- Migrating from PHP 7.2.x to PHP 7.3.x  
    (<https://www.php.net/manual/en/migration73.php>)
- Migrating from PHP 7.3.x to PHP 7.4.x  
    (<https://www.php.net/manual/en/migration74.php>)
- Migrating from PHP 7.4.x to PHP 8.0.x  
    (<https://www.php.net/manual/en/migration80.php>)
- Migrating from PHP 8.0.x to PHP 8.1.x  
    (<https://www.php.net/manual/en/migration81.php>)
- Migrating from PHP 8.1.x to PHP 8.2.x  
    (<https://www.php.net/manual/en/migration82.php>)
- Migrating from PHP 8.2.x to PHP 8.3.x ([https://www.php.net/manual/en/migration83.php](https://www.php.net/manual/en/migration70.php))
- Migrating from PHP 8.3.x to PHP 8.4.x  
    ([https://www.php.net/manual/en/migration84.php](https://www.php.net/manual/en/migration71.php))

### **PHP Upgrade**

Now we are ready to proceed with the actual upgrade. Go to your **[staging environm](https://pressidium.com/blog/staging-environment-wordpress/)[ent](https://pressidium.com/blog/staging-environment-wordpress/)** and follow these steps in this order:

1. **Update WordPress core, Themes, and Plugins.** Ensure that you are running the latest version. If they are outdated, they may not be compatible with newer PHP versions.
2. **Upgrade PHP** to the new version.
3. **Thoroughly test your website** in the staging environment. Check for any errors, broken functionality, or compatibility issues. Despite the check you have already done beforehand, there are still chances that custom functionality or plugins might be affected by the PHP upgrade. If you have custom PHP code in your theme or plugins, review and update it if necessary to ensure compatibility with the new PHP version.
4. **Monitor the error logs** in the staging environment. Any PHP errors or warnings, or deprecation notices that occur during testing should be addressed and resolved. You might need to temporarily [enable WordPress debug mode](https://pressidium.com/blog/what-are-wordpress-error-logs-and-how-do-you-use-them/) to increase the verbosity and the information contained in the logs.

Now go to the **production environment** to resume.

NOTE: You should pick a time when your website experiences the least traffic to minimize disruptions. Ideally, inform your users in advance about the planned downtime.

**Remember to make a full backup first!** and then **upgrade PHP on your live site** with the same procedure you followed on your staging site. As mentioned earlier, you may need to contact your hosting provider or server administrator for help during this process.

#### **Post-Upgrade Tasks**

- Monitor after the upgrade for any issues that may have been missed during staging testing.
- Keep an eye on your website for a period after the upgrade. Sometimes, certain issues may not become apparent immediately.

## Upgrading PHP as a Pressidium Customer

Pressidium provides a **[straightforward](https://help.pressidium.com/en/articles/1663883-switch-your-php-runtime) [way to switch PHP](https://help.pressidium.com/en/articles/1663883-switch-your-php-runtime)** versions through your personal dashboard.

![Pressidium provides a straightforward way to switch PHP versions through your personal dashboard.](https://pressidium.com/wp-content/uploads/2023/11/pressidium-dashboard-switch-php-version-1.png)    For your pre-upgrade phase, you can make your checks and tests in a [staging environment](https://help.pressidium.com/en/articles/1674852-initialize-your-staging-environment) that you can create in minutes with one click.

There, you can resolve potential compatibility issues **before** switching PHP version on your production site. If you also need to **enable WordPress debug mode**, you can do this easily in the dashboard as well.

![](https://pressidium.com/wp-content/uploads/2023/09/pressidium-dashboard-enable-wp-debug.png)    

## Conclusion

Updating your PHP version is not just a matter of best practice; **it’s a critical step in safeguarding the functionality, security, and overall health of your website**. Running an outdated PHP version exposes your website to vulnerabilities that hackers actively exploit, potentially leading to data breaches, unauthorized access, and other security breaches.

Hopefully, by reading this guide, you will be able to safely and correctly upgrade your PHP and enjoy a modern and fully functional website.

 Start Your 14 Day Free Trial

 Try our award winning WordPress Hosting!

 [ START YOUR FREE TRIAL ](https://pressidium.com/free-trial/?utm_source=pressidiumcom&utm_medium=blog&utm_campaign=tutorials) [ VIEW OUR PRICE PLANS ](https://pressidium.com/plans/?utm_source=pressidiumcom&utm_medium=blog&utm_campaign=tutorials) 

 

 ![](https://pressidium.com/wp-content/themes/pressidium-com/assets/pages/blog/partners/1.png) 

 ![](https://pressidium.com/wp-content/themes/pressidium-com/assets/pages/blog/partners/2.png) 

 ![](https://pressidium.com/wp-content/themes/pressidium-com/assets/pages/blog/partners/3.png) 

 ![](https://pressidium.com/wp-content/themes/pressidium-com/assets/pages/blog/partners/4.png) 

 ![](https://pressidium.com/wp-content/themes/pressidium-com/assets/pages/blog/partners/5.png)