How To Test And Update The PHP Version Of Your WordPress Site?

by WP Creative on 2020 December | Posted in PHP, WordPress, WordPress Developer

Do You Need to Upgrade the PHP Version?

PHP has released many versions in the past few years. Each new version offers many opportunities for website developers, from improving site performance to an increase in operations and efficiency.

A new version offers a lot of benefits for the users and hosting providers alike. However, many hosting providers don’t move to the latest stable PHP version fearing that it will break their hosting systems. This can cause efficiency and performance issues for many users who have websites hosted with these providers.

It is better to move from these hosting solutions to better ones that offer the latest PHP versions. However, some users simply don’t update their site’s PHP versions even if they are provided by their hosting providers. Most of them simply don’t know how to get this task done and this article is for them.

Which is the Current Stable Version of PHP?

Currently, the most stable version of PHP is PHP 7.4. It is significantly faster than other PHP platforms and a lot more secure. The best part about this version is that it is updated automatically. It means that you won’t have to check for the latest updates – something that users had to do with previous versions. PHP 7.4 is also compatible with all versions of WordPress.

How to Check the PHP Version of Your WordPress Website?

Here are a few ways to check if you are using the latest PHP version for your WordPress website.

Check Hosting Management Panel

One way to check for your WordPress PHP version is through your hosting account control panel. This method is the safest and you will not have to tinker with any source files. Almost all hosting providers list the PHP version in the control panel. If you have a cPanel enabled on your hosting provider, you can check the

Every quality hosting provider will list your PHP version somewhere in your control panel. If it’s not clearly labelled, you may just need to refer to the specific documentation of your web host.

If your hosting provider uses cPanel, login, and select the PHP version. Under the Software section, click on Select PHP Version as we have shown in the image below.

This will show you the current PHP version available for your website.

Use a WordPress Plugin

WordPress shows the updated PHP version error when you are using an outdated version.

The best way to update it is to first check the version that you are using. You can use a plugin to find out the version of the WordPress website. Download the plugin Display PHP Version.

The plugin simply shows the PHP version of your website on the dashboard.

Why is it important to see your PHP version?

Because it helps you in determining if you are facing any issues on your website because of your PHP version. The most common issues related to performance can be easily solved with the latest PHP version installation.

Use Third-Party Application or Website

You can also find out the PHP version of your website by using the application testing service. BuiltWith tells about all the plugins you have enabled on your website. It also tells about the WordPress PHP version.

To find out the version number, simply login to Builtwith control panel and select Detailed Technology Profile.

It will show you the PHP version that is currently installed on your website.
But there is a catch. Since Builtwith is a third-party tool, it can only detect the PHP version if it is made public by the website admin. If it is not made public, Builtwith won’t show the PHP version.

Now that we are aware of the many ways to see the PHP version of a WordPress website, it is time to understand how to update it.

How to Update PHP Version?

While PHP 7.0+ versions support all the plugins, there is a possibility that some of your site plugins may not work when you move from your current PHP version to the latest one.

If that is the case with your version, make sure to roll back to the PHP version that was stable, or simply do away with the plugins, if they have better replacements available. Almost all reputable plugins support PHP 7.0 versions.

To update the PHP version of your website, you will have to backup everything. If you are a beginner, our advice is that you try updating the PHP version on a WordPress installation on the localhost – which means your computer. Or, you can simply contact us and we can update your website and optimize it according to your needs.

Get In Touch With Us!

1. Backup Everything

You can use a backup plugin like UpdraftPlus to backup everything available on your website to a third-party server. Once all the data is securely backed up, copy all the images and documents in your media library to a secure server. Most backup software doesn’t copy the media library. Even the WordPress export file doesn’t create a backup of the media library.

You can select the media files from Public_HTML > WP_Content > Media Files.

Once you have successfully backed up all the files to a secure location, move to step two.

2. Check If Plugins Are Compatible With Latest PHP Version

You can download a plugin to check if your current plugins will be compatible with the latest PHP release. To do so, simply open download PHP Compatibility Plugin on your WordPress website.

Once the plugin is installed, it will show you all the plugins that can work with PHP 7.0+.

Now update the WordPress PHP version through cPanel.

3. Update PHP Version from cPanel

Go to cPanel and then click on ‘Select PHP Version’ and open it. It will show you all the latest versions available for your hosting package.

Select the latest stable PHP version from the list and install it on your website. To do so, click the ‘Set as Current’ button.

Your website will automatically update to the latest version. You can check the PHP version from the cPanel by clicking the ‘Select PHP Version’ option or through WordPress. Refer to the ways we mentioned above.

4. Upgrade with SSH

To upgrade to the latest version using SSH, your hosting provider should provide you with root access to the server. If you have the root access enabled, you can connect to the SSH with admin credentials.

Once you are inside, add the following codes to move from your current PHP version installation to the latest stable one.

AddHandler application/x-httpd-php74 .php .php5

This will install the PHP 7.4 version on your website.

You will have to ensure that your website works appropriately on the latest version by adding the following lines of code to it in .htaccess file.

You can also check the current PHP version of your website with SSH. Simply add the following code:

<FilesMatch ".(php4|php5|php3|php2|php|phtml)$">
SetHandler application/x-lsphp74

php -v

This will list the current PHP version installed on your hosting server.

hosting server

That’s it. You have successfully installed the latest PHP version on your WordPress website. Now you can check this version on your WordPress dashboard if you have the PHP Version plugin installed.

If you face any issues in installing the PHP version on your website, we can help you with that. Our expert developers can offer support for all types of WordPress development issues. Whether you want to customize your theme, remove bugs, or optimize your site performance, we have the right team available.

Book Your Free Site Consultation Today

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Looking for a WP developer?

  • This field is for validation purposes and should be left unchanged.

  • Recent Post

  • Categories

  • © 2021 WP Creative, Naphix Pty Ltd. ABN: 65 610 345 198