How to Check and Update WordPress PHP Version

Updated on November 23, 2023 by Editorial Team

Do you wonder How to Check and Update PHP Version in WordPress? This is your one-stop guide to PHP versions and updates.

WordPress was developed using the PHP programming language. It gets regular updates, which enhance its functionalities and security.

So, website owners and developers must always use the latest PHP version on their sites.

This blog will show you different ways to check your website’s PHP version. We’ll also walk you through the steps to update PHP to the latest version.

Let’s get started.

Table of Contents
Stay ahead of the curve with our exclusive insights and analysis on the latest WordPress trends and techniques - subscribe to our newsletter today.



    What Is PHP?

    PHP, short for Hypertext Preprocessor, is an open-source scripting language for web development. The language is mainly used for server-side scripting, i.e., it runs on the website’s hosting server.

    The PHP code is stored on servers in files with a .php extension. These files are programs that power the WordPress content management system.

    Overview of WordPress and PHP

    PHP was introduced in 1994 to facilitate web development. The WordPress CMS program is written in PHP. Besides PHP, WordPress also uses HTML, CSS, and JavaScript.

    HTML and CSS are used for website design and customization, such as page layout, typography, etc. PHP and JavaScript, on the other hand, are responsible for the site’s functioning, be it validating a user, form submission, etc.

    Here’s a simple example to help you understand how PHP works in WordPress.

    When users visit your site, their browser sends requests to your server. The server then runs the PHP code to find relevant assets in your database to generate the requested HTML page.

    Finally, the server sends the page to the user’s browser, displaying all the relevant information.

    While PHP is an important component of the WordPress core, it is also used to develop plugins and themes. As a result, installing the latest PHP version becomes essential to avoid incompatibility issues.

    How to Check PHP Version in WordPress?

    Over the years, PHP has been updated several times to improve its overall functionality.

    WordPress recommends developers use PHP 7.4 or a newer version for a smooth experience. The latest version, i.e., PHP 8.2, was released in December 2022.

    So, which PHP version does your website run? There are two ways to find out.

    1. Use the WordPress Site Health Tool

    You can find your website’s PHP version from the WordPress admin dashboard. Log in to WordPress, head to the side menu, and click Tools > Site Health.

    Now, you’ll see two tabs on your screen – Status and Info. Navigate to the Info tab and expand the section named Server. There, you can find the PHP version with other information about server names, architecture, etc.

    2. Use the Hosting Control Panel

    You can also check your site’s PHP version using your hosting provider’s control panel. The following steps are for the cPanel server management interface.

    Log in to your hosting account, and click the Select PHP Version option under the Software section.

    Source

    Your site’s current PHP version will be displayed under the PHP Extensions section.

    Source

    How to Update PHP Version in WordPress?

    Once you have checked your PHP version, the next step is to update it to the latest version. You can do that from your hosting control panel.

    But first, let’s see why you must install the latest PHP version on your server.

    Why Should You Update the PHP Version of the WordPress Site?

    PHP is at the core of any WordPress website. So, any issues in PHP can severely impact your site’s performance and hinder its security.

    Here’s how updates help.

    1. Performance Improvements: With each update, developers implement cleaner code, which is easier and quicker for the server to execute. Any errors or bugs are also fixed. So, your server executes requests faster, and your website loads quickly on users’ devices.

    2. Server Resource Usage: Server resources are limited. However, older PHPs didn’t have clean codes. So, every request took considerable processing power to execute. A benchmark revealed that PHP 7 takes 25 million CPU instructions to execute a request, while PHP 5.6 takes 100 million CPU instructions to execute the same request.

    3. Security Updates: Newer versions also have security patches based on the latest threat definitions. PHP 5.2 was known to have severe security issues. However, with each new update, developers have patched vulnerabilities over time.

    4. Compatibility: PHP is also used to develop WordPress themes and plugins. While you can continue to use the same PHP version, theme and plugin developers may adopt the newer version. As a result, their more recent updates may not work with your website.

    5. Obsolescence: Developers only support each PHP version for three years. In the first two years, they get bug fixes and patches at regular intervals. The last year is only for patching any critical issues. So, you won’t receive new updates if you use a PHP version beyond the supported period.

    Looking for ways to secure your website? Check out these top 5 WordPress security plugins.

    Now, let’s see how to install the latest PHP version using different web hosting control panels.

    Update the PHP version in cPanel

    If your server uses the cPanel server management interface, you must log in to your cPanel and click Select PHP Version under the Software section.

    Source

    Select the site/s where you want to install the new PHP version. Then, select a newer PHP version to install from the drop-down menu.

    Source

    Click Apply. A new PHP version will be installed on your site.

    Update the PHP version in Kinsta

    If you use Kinsta hosting, first navigate to the Sites tab in the menu on the left side of your account’s dashboard. Then, select the site where you want to install the new PHP version.

    Click the Tools tab. Look for the Modify button under the PHP Engine section. Click it and select a PHP version from the list.

    Source

    A confirmation dialog box will open. Click the Modify PHP Version button to start the update.

    Source

    Update the PHP version in SiteGround

    On SiteGround, the process is similar, but you can pick between Ultrafast PHP and regular PHP. The Ultrafast PHP includes some performance boosters from SiteGround.

    First, open the Website tab and access Site Tools for the desired website.

    Source

    Then, navigate to Devs > PHP Manager from the column on the left. Click the Change PHP Version under the Manage PHP Settings section.

    Source

    A pop-up will open, where you must pick the Change PHP Version Manually option from the Set PHP Version drop-down menu. Next, select the PHP version and click Confirm.

    Source

    Update the PHP version in the WP Engine

    Unlike the other three options, WP Engine is a managed hosting provider. So, the latest PHP version will be installed automatically when it becomes available.

    However, you still have the option to upgrade or even downgrade manually.

    To change the PHP version, log in to your WP Engine account and open the Overview tab. Click the PHP version in the Updates section.

    Source

    Select whether you want to upgrade or downgrade the PHP version in the pop-up dialog. Finally, click the Change PHP Version button.

    Source

    What to Do After Updating Your WordPress PHP Version?

    After you’ve installed the latest PHP version, your website should work flawlessly. However, in rare cases, the latest update may introduce incompatibility issues or break your site.

    So, you must also take some additional measures to ensure your site works smoothly after the update.

    • Test if all the functions on your site’s front end work without issue.
    • Check the compatibility of installed themes and plugins.
    • Update your themes and plugins to the latest version.
    • Do a before and after test of your site’s performance to see any slowdown after updating.
    • Perform a security audit to catch any vulnerability introduced by the new version.

    If you find an issue, you can downgrade to the previous PHP version and see if it fixes problems. Or you can troubleshoot the issue by yourself.

    Start by deactivating all plugins and switching to the default theme. Then, you can reactivate them individually and test your site to identify which component caused the problem.

    If you can’t troubleshoot, you must readily contact your hosting provider for assistance.

    Besides these post-update measures, it is a good practice to back your site up before updating the PHP version. In case a PHP update breaks your site, you can restore your backed-up site.

    Also, do not install updates directly to your live site without testing. You must create a staging environment and update PHP within it. If everything works fine, you can install the new PHP version on your main site.

    Get our best WordPress tips, tricks, and tutorials delivered straight to your inbox - Subscribe to our Monthly Email newsletter Today.



      Wrapping Up

      Updating the PHP version of WordPress should be an important step in your website maintenance process. It not only improves the site’s performance but ensures there are no incompatibility issues and vulnerabilities.

      While the latest WordPress has support for slightly older PHP versions, it is advised that you always install the newest version. Also, upgrade your plugins and themes after updating the PHP version.

      Just like the latest PHP ensures your website functions smoothly, The Plus Blocks for Gutenberg improves the default WordPress block editor.

      For just $39/year, The Plus Blocks gives you access to over 85+ advanced WordPress blocks and 300+ prebuilt UI blocks and templates.


      Check the entire list of 85+ Blocks Library from The Plus Blocks

      Not only that. You also get advanced features like Blog Builder, WooCommerce Builder, Mega Menu, and more.

      Download The Plus Blocks for Gutenberg today!

      FAQs on Checking WordPress PHP Version

      Is it safe to update PHP?

      Yes, it is safe to update the PHP version as long as you install it from a trusted source like your hosting provider. Rarely, updates may introduce incompatibility issues with preinstalled plugins and themes. So, always test new PHP in a staging environment before installing it on your main site.

      Which PHP version is compatible with WordPress?

      At present, WordPress supports PHP 7.4 or newer. You can check the detailed combability status on WordPress.org.

      How do I find my WordPress PHP version?

      From the WordPress admin dashboard, head over to the navigation menu and click Tools > Site Health. Then, navigate to the Info tab and expand the Server section. There, you can find your site’s PHP version.

      What is the minimum PHP version for WordPress?

      The latest WordPress version requires PHP 7.4 or higher to run smoothly.

      How can I check my PHP version?

      To check your PHP version, open the Site Health section from the WordPress dashboard. Then, head over to the Info tab and click the Server option, and you’ll see a row with the PHP version.

      How do I update my PHP version in WordPress?

      You must use your hosting control panel to update your WordPress site’s PHP version. For cPanel, you can update PHP from the Select PHP Version option under the Software section. See the complete steps on our blog.

      What happens if I have an outdated PHP version on my WordPress site?

      An outdated PHP version can hinder your site’s performance. That’s because most of your plugins and themes probably use a newer PHP, which causes incompatibility issues. Besides, outdated versions do not get the latest security patches, leaving your website vulnerable to cyberattacks.