How to Check & Update PHP in WordPress [Step-by-Step Guide]

Updated on June 6, 2024 by Editorial Team

Do you want to update PHP in WordPress? PHP is a programming language that works with JavaScript, HTML, and CSS to run WordPress websites and process the data required to display the website.

Using the latest PHP version of WordPress is crucial for a fast-performing, secure, and high-ranking website. It can significantly improve the website speed and boost user experience.

This makes it important to regularly check your website’s PHP version and update it for optimal performance.

In this article, we’ll explore what PHP is, how to check the WordPress PHP version, and how to upgrade WordPress PHP for your website.

Table Of Content

What is PHP?

PHP is an open-source, server-side scripting and programming language that runs on the website hosting server and is used to build and maintain websites.

Zfkkbklqqkhe3gwmk2va how to check & update php in wordpress [step-by-step guide] from the plus addons for elementor

What is the Role of PHP in WordPress?

Any WordPress website runs on four types of languages- HTML, JavaScript, CSS, and PHP.

While the design and display of a website, such as text formatting, color, positioning, and font, are controlled by HTML and CSS, the website’s functionality is managed by JavaScript and PHP.

This includes UI and page updates, user form validation, form submission to the server, etc.

Instead of storing each website page as an HTML file, the WordPress database stores many PHP files to control different parts of your website, such as headers and footers, navigation, or comment sections.

WordPress sites use PHP to pull data from the server and generate the pages dynamically. When a user enters a web page URL, a PHP module processes this request on the server.

Next, the server generates a PHP code to create an HTML page from scratch and delivers it to the visitor.

Why Should You Update PHP in WordPress?

Updating to the latest version of PHP for WordPress helps you improve your website for speed, performance, and security.

Here are the various benefits of upgrading the PHP version.

  1. Increase website speed and performance

Every time a user loads a web page, PHP has to process the server request, locate it in the WordPress database, and send it to the browser in HTML format to display it.

This results in a lot of PHP requests to load a single page, which can affect the website’s speed and performance.

Regular PHP updates introduce new features and functions and facilitate efficient use of resources. As a result, with each PHP update, your website will run faster and more efficiently, thus boosting the user experience.

  1. Better website compatibility

When you update the WordPress PHP version, the other components of your WordPress website, like themes and plugins, also get optimized to run on the latest PHP version.

This ensures that your website core files are compatible with the latest PHP updates and offers excellent performance.

  1. Enhance website security

Since PHP is a popular programming language for WordPress websites, it is often vulnerable to security attacks.

The latest PHP updates contain fixes and patches for vulnerabilities to improve website security.

If you fail to update to the latest versions, your website will be vulnerable to viruses, malware, and unauthorized access by outsiders. This is why you must check and update the WordPress PHP version regularly to improve protection against security breaches.

How to Check Your Current PHP Version in WordPress?

It is easy to check the PHP version your website is currently running on.

Here are the two ways to do so-

1. Use the WordPress Site Health Tool

If you’re using WordPress 5.0 or higher, you can simply check the PHP version in WordPress through the dashboard.

Use the wordpress site health tool how to check & update php in wordpress [step-by-step guide] from the plus addons for elementor

Login to your admin dashboard, go to Tools > Site Health and switch to the Info tab.

Here, click on Server to see the current versions of PHP that your website is using.

Current version of php how to check & update php in wordpress [step-by-step guide] from the plus addons for elementor

2. Use the Hosting Control Panel

You can also check the PHP version in WordPress via cPanel. For this, login to cPanel and navigate to General Information.

Use the hosting control panel how to check & update php in wordpress [step-by-step guide] from the plus addons for elementor

You will be able to see the current PHP version of your website.

General php info how to check & update php in wordpress [step-by-step guide] from the plus addons for elementor

What to Do Before Updating PHP in WordPress?

Before you move forward with updating the website’s PHP version, there are certain things you need to take care of to avoid losing your website data or settings.

Here’s what you need to do-

  • Create a website backup: It is important to completely back up your website to avoid losing your work. This is because there is always the possibility of an error when updating software, which can affect your website. To avoid this, create a website backup using a free WordPress plugin or via the admin hosting panel.
  • Update WordPress: Updating your website core, themes, and files ensures that they are compatible with the latest PHP version. To do this, go to Updates on your WordPress dashboard to view the available updates and update your WordPress and its themes and plugins.
  • Check your server: Another aspect you need to check is if your server supports the latest PHP version for WordPress. You can find this information in the provider’s documentation or contact their customer service. If the server is not compatible with the latest PHP, you can request for PHP support or switch to a new hosting provider.

How to Update PHP in WordPress?

Now that you know how to check the PHP version, it’s time to update to the latest version.

Here are 4 simple ways to do so using different hosting site tools-

1. Update the PHP version in cPanel

To update the PHP version in the cPanel, log to your hosting provider’s website and go to cPanel. Scroll down to find the Software section and click on Select PHP version.

Update the php version in cpanel how to check & update php in wordpress [step-by-step guide] from the plus addons for elementor

On the new page, click on the current PHP version, and a dropdown menu will appear.

Here, simply select the latest version of PHP and set it as current.

Select the current version of php how to check & update php in wordpress [step-by-step guide] from the plus addons for elementor

2. Update the PHP version in Kinsta

Follow these steps to update the PHP version in Kinsta

Step 1: Create a staging environment

Start by creating a staging site, which will create a testing environment for your site, allowing you to test the new PHP versions without breaking the site.

To do this, go to MyKinsta Dashboard > Sites and select the site for which you want to change the PHP version.

Update the php version in kinsta how to check & update php in wordpress [step-by-step guide] from the plus addons for elementor

Click on the dropdown menu next to the website name, select Staging, and click on the Create New Environment option.

Create a stagig environment how to check & update php in wordpress [step-by-step guide] from the plus addons for elementor

Step 2: Update the PHP version

Go to the Tools section under your website’s menu in the MyKinsta dashboard and navigate to the PHP Engine section.

Select php engine how to check & update php in wordpress [step-by-step guide] from the plus addons for elementor

Click on Modify and select the new PHP version from the dropdown menu.

Select new php veriosn how to check & update php in wordpress [step-by-step guide] from the plus addons for elementor

You will receive a confirmation popup window. Click on Modify PHP Version, and the process will start. It will take a few minutes to complete.

Oj06kv2ruicajhrplhp3 how to check & update php in wordpress [step-by-step guide] from the plus addons for elementor

Step 3: Test your website in the staging environment

Now, check your test your WordPress website, themes, and plugins with the latest PHP version in the staging environment. In most cases, this will go smoothly if you’ve already updated the WordPress core, themes, and plugins before updating the PHP version.

However, if there is an issue and you see an error message on the screen, check which themes or plugins are causing the issue by deactivating them and reactivating the plugins one by one.

Once you have tested the website in the latest PHP version for WordPress and if you’ve made any changes, click on the Push Live button from the dropdown menu at the top of the website dashboard. This will push all the changes made in the staging environment to the live site.

Step 4: Update PHP on the live site

Finally, update the PHP version on the live website by visiting your MyKinsta dashboard, navigating to Site and choosing the website.

Click on Tools, select PHP Engine and click on Modify.

3. Update the PHP version in SiteGround

Log in to your SiteGround dashboard and go to the Website tab to find your website.

Update the php version in siteground how to check & update php in wordpress [step-by-step guide] from the plus addons for elementor

Under the website name, click on Site Tools and navigate to DEVS > PHP Manager from the left column.

Click on site tools 1 how to check & update php in wordpress [step-by-step guide] from the plus addons for elementor
Select php manager how to check & update php in wordpress [step-by-step guide] from the plus addons for elementor

Click on the pencil icon, and a popup window will appear. Here, select Change PHP version manually from the Set PHP version dropdown menu.

Change php version manually how to check & update php in wordpress [step-by-step guide] from the plus addons for elementor

Then select the latest PHP version from the next dropdown menu. Click on Confirm to save the changes.

Select php version how to check & update php in wordpress [step-by-step guide] from the plus addons for elementor

4. Update the PHP version in WPEngine

WPEngine is a managed hosting service provider, which means they automatically update the PHP version for your WordPress website.

However, if you want to do a PHP version check and update it manually, you can do so through their dashboard.

Log in to your WPEngine dashboard. Go to My Sites page and click on your website name.

Update the php version in wpengine how to check & update php in wordpress [step-by-step guide] from the plus addons for elementor
Wpengine sites how to check & update php in wordpress [step-by-step guide] from the plus addons for elementor

Click on the PHP version number mentioned there and choose the Upgrade to PHP (version number) option.

Click on php version number how to check & update php in wordpress [step-by-step guide] from the plus addons for elementor

Select Confirm to save the settings.

Php selector how to check & update php in wordpress [step-by-step guide] from the plus addons for elementor

What to Do After Updating the PHP Version?

Once you’ve updated WordPress PHP, check all components of your website, such as the themes and plugins, to see if they’re functioning properly.

However, on the off chance you encounter an issue with the latest PHP version, you can easily revert to your website backup without any issues.

20 checklist for wordpress site maintenance how to check & update php in wordpress [step-by-step guide] from the plus addons for elementor
Do you Manage WordPress Websites? Download Our FREE E-Book of 20+ Checklist for WordPress Site Maintenance. ​



    Wrapping Up

    Updating your WordPress PHP version is an important step for ensuring a fast-performing, secure, and stable website.

    The latest PHP version contains updates for speed, security, and compatibility, allowing you to optimize your website for the best performance and offer exceptional user experience.

    Improve your Elementor website’s design and performance with The Plus Addons for Elementor.

    It is an all-in-one plugin that offers more than 120 unique, fully functional Elementor widgets to help you enhance the website’s features and performance.

    Check out the Complete List of 120+ Widgets and Extensions here. Start building your dream website without coding!

    FAQs on Updating PHP in WordPress

    What if my site breaks while updating the PHP version?

    Although it is highly unlikely that your site will break after the PHP version update, if it happens, you can use the Recovery Mode in WordPress to bring back your site after an error. Alternatively, you can also restore the website backup to roll back to the older version.

    Can I revert to the old PHP version if I encounter issues?

    Yes, if you have an issue with the WordPress website, you can always revert to the old PHP version by accessing the settings from your hosting provider’s dashboard.

    What if I don’t have the permission to update PHP in WordPress?

    If you’re unable to update the WordPress PHP version, you need to contact the hosting provider to request that the PHP be updated to the latest version. If they don’t offer support for the latest version, it’s ideal to switch to a new hosting provider.

    How often should I update PHP in WordPress?

    You must update the PHP version in WordPress after every version is introduced to keep your website secure and compatible at all times.

    Why is my WordPress site not showing the updated PHP version?

    If your WordPress website is not showing the updated PHP version, it might be an issue on the server. You can contact your hosting service provider to know more and get the issue fixed.

    How to update the PHP version in WordPress without cPanel?

    There is no other way to update the PHP version in WordPress without cPanel. You have to use your hosting provider’s cPanel to update PHP, or you can simply request that the hosting provider do so.

    Create Elementor Websites
    in Seconds with
    120+ Elementor Widgets & 1000+ Elementor Templates
    Get Free 25+ Secrets to Make Elementor Website Faster [Guaranteed Results]



      Automatically Convert Figma Designs to 100% Editable Elementor Website
      X