93 318 54 36

How to Check and Update the PHP Version of Your WordPress Site

14/03/2022
Marcos Guerrero

PHP is an essential part of any WordPress website. It must work in the best possible way. By understanding the principles behind PHP and the update process, you can maintain this core element of your site.

In this article, we will introduce you to PHP and explain why it is so important. Then, we'll show you how to safely check, update, and update your PHP version.

 

An introduction to PHP

Code is the basis of every website. The programming language may vary between systems, but it is absolutely essential for the proper functioning of a site. For WordPress, the language is PHP.

PHP is especially used for web development. This server-side code creates much of what you see on the back-end and front-end of a site. 

This is how PHP works : First, someone visits your website. This action causes whatever browser they are using to launch a search for your site's server. 

The PHP code then accesses your main database (MySQL) and retrieves the requested data. Finally, PHP takes the last crucial step and translates that data into an HTML format.

All you need to know is that PHP is an essential part of how WordPress receives and displays data. Otherwise WordPress would not be able to run.

 

Why is PHP essential for WordPress websites?

When you access the admin panel, the PHP inside your files will retrieve the data it needs. This principle also applies to any plugin or theme that is running the website.

Given how interconnected WordPress is, any changes to your PHP version can affect the functioning of the entire site. On the other hand, a less recent version can cause a negative ripple effect for users.

PHP may run as a central aspect of your site, but that doesn't mean it won't need maintenance from time to time. Like most software, you will need update code at least regularly to avoid problems.

 

Three reasons to keep your site's PHP updated

1. Improve your site speed

An outdated version of PHP can really slow down the site. Older versions will not be optimized to make the most of server resources and may run slower. Since PHP is so important to the web, this can lead to reduced performance across the board. 

Lat site speed It is a critical part of any user experience. A user expects very fast loading times with each click. Even a small increase of one to three seconds can increase your bounce rates by 32% . 

Of course, it's not just a smooth browsing process. The speed of a website is tied to its position in search engine rankings: the slower its speed, the lower its ranking. This can lead to less organic traffic. Use a tool like GTmetrix to measure the current speed of your website. 

You may find that your site is not performing as well as it could. Then update your PHP and test again. Updating your PHP is worth the effort in terms of speed alone.

 

2. Stay on top of security

We probably don't have to tell you the importance of WordPress security . Safeguarding user data can protect them against all the dangers that the network contains. Updating your PHP version is a simple but effective way to maintain a strong layer of security. One of the reasons for this is potential security weaknesses. As with WordPress, developers will release patches to fix any vulnerabilities. 

Still, keep in mind that PHP is an open source language. It is a good way to encourage development within the community, it also has a drawback: anyone can modify the code, including hackers.

When coupled with the fact that so many websites use this language, you have to be careful. As they find new ways to infiltrate your PHP code, developers react by creating more secure versions.

We can think of PHP version as one of many layers of security. Unfortunately, no protection method is perfect. Even protection, such as malware analysis and firewalls also fail. But if you're maintaining your PHP correctly, you can eliminate one more opportunity for malicious actors to access your site.

 

3. Maintain your overall stability 

PHP versions that do not properly utilize your server resources can cause excessive memory usage. This, in turn, can cause the site to crash, damaging the user experience and potentially affecting its search engine rankings. Updates can help fix this issue by optimizing the use of server resources. Using fewer memory resources decreases the possibility of overloading the system. It can also avoid mishaps that can occur if the version is not compatible with the template or plugins.

Additionally, updates are crucial for security. Having to recover from an attack can mean being offline for a long time. A step towards a safer place is also a step towards a more stable one. 

 

How to check your PHP version

Here are two ways to determine what version of PHP your WordPress website is currently running on.

1. Use the WordPress backend

Fortunately, WordPress is a fairly easy platform to use. Its developers have included several measures to help you keep your website in tip-top shape. This includes notifications about any new versions of PHP. Therefore, you may see this alert on your dashboard if you are running an outdated version.

Another option is to go to Tools  Site health  Information . Then scroll down to the option Server. Click on it to reveal your PHP version.

Finally, if none of the above methods work, you can also use a plugin. Plugins are the easiest way to add functionality to the site. In this case, you can use one to make management even easier.

We recommend looking for one that has positive reviews. These are usually indicators of a quality supplement.

We have chosen to use the Display PHP version . It is simple, light and easy to use.

You should then see what version of PHP your site is running, just below your WordPress version. While you can update WordPress from here, you won't have the option to update your PHP version.

2. Access the information through a new PHP file

If we don't have access to the backend, you can also use a slightly more technical path to obtain the necessary information.

You can start by opening a text editor and creating a new file. You will then want to enter the following code from the phpinfo() file :

Next, name the file phpversion.php and save your work. Make sure it is saved as php and not txt. After that, go to your root directory and upload the file. You can do this with your hosting service's file manager or via FTP.

From there, you can access information about your PHP version by going to example.com/phpversion.php . remember to replace example.com with the URL of your website. Once you're done, be sure to delete the file to keep your data safe.

 

Three things you should do before upgrading your PHP version

1. Create a backup of your site

First, we recommend that you create a full backup of your current site. Updating your PHP is unlikely to cause any problems, but errors can occur. You will need to connect your site to WordPress.com. This is necessary even if it is not your hosting provider. 

You will be able to see when the last backup was completed. You can also click See all your copies backup if you want to view previous copies.

2. Make sure WordPress is updated

Before updating your PHP version, we recommend that you check your WordPress version. This is because outdated WordPress software could potentially be incompatible with your new PHP data.

If you do not see this alert, go to Control panel  Updates

3. Check the compatibility of your plugins and themes

PHP plays a role in almost every part of your site. That means there are some opportunities for it to clash with other programs. Plugins and themes can be particularly complicated.

This is why we recommend that you check its compatibility before starting the update process. This helps prevent any potential issues that could crash the site.

As with PHP, developers must update their applications to work well with the latest versions of WordPress. Therefore, enabling automatic updates may be the easiest way to ensure compatibility. Alternatively, a manual update schedule can also be set. Make sure everything is up to date. It is the easiest way to avoid errors on your website.

 

How to update PHP versions with cPanel

Once you're done preparing to upgrade safely, you can upgrade your PHP version with cPanel. There are step-by-step tutorials on how to do this on three of the major hosting services.

  1. Bluehost: If you're like most Bluehost customers, you're probably operating on the Bluerock interface. Older clients may still work with legacy settings. We'll take a look at both, starting with Bluerock. Start by logging into your Bluehost control panel. Then go to Advanced  Software  MultiPHP ManagerFrom here, you will be able to choose the website you want to update. Choose the version of PHP you want to use. Then click Apply to finish the process. If you are using the legacy interface, you will also start in the Bluehost control panel. This time you will find the tab Hosting and you will select cPanelThen, scroll down until you find the section Programming Languages . Please select PHP Config followed by the version you would like to use. Finally, click Save When it's over.
  2. Dreamhost: Next, let's take a look at DreamHost. Please note that DreamHost has a minimum supported PHP version for security and performance reasons. Fortunately, updating your PHP version is usually easy. You can start by going to the page Manage sites Web. Then click ManageSelect Modify . You will then be able to choose the latest version of PHP from the dropdown menu. When everything is ready, press Change PHP version to save the changes and go.
  3. A2 hosting: Finally, let's quickly see how to change your PHP version on A2 Hosting. Start by logging into your cPanel account. Then go to the section Software and click Select PHP version . Once you have selected that, you will see the current PHP version. You will also see a list of your other options. Click on the one you want to apply. There is no need to save the changes: the update will be done automatically. 

 

How to make sure your new version of PHP is working

Once you've finished your setup, you probably want to make sure the changes have actually been applied. One way to do this is to review the steps to check your PHP version that we covered earlier.

However, not all updates will be applied correctly. If you want to avoid mishaps, you can always try browsing the Home page of your website. If everything has gone well, nothing should be perceived. 

You can also check your plugins. As we mentioned above, there is always the risk that some programs are incompatible. If you don't see any errors and it seems to work without problems, you're all set and go ahead.

On the other hand, you may notice some glitches with your plugins. When this happens, we recommend that you uninstall the plugging that is not working properly. If that fixes the problem, it may not be ready to work with the new software. Alternatively, it may need an update itself.

We also recommend that you repeat this process with your themes. 

 

Stay up to date with PHP

Updates are a natural part of any application's lifecycle. Thanks to how central PHP is to your WordPress website, applying these changes is particularly important. Fortunately, staying up to date with your current PHP version is very important for website health. In this article, we've introduced you to PHP and explained why it's so important to keep it up to date. We've also shown you some ways to check your current version.  

Do you need to update your website?

Do you need any of our web design services? In IndianWebs We have extensive experience, and a team of programmers and web designers in different specialties, we are capable of offering a wide range of services in the creation of custom web pages. Whatever your project is, we will tackle it.