Why You Should Upgrade Your WordPress PHP Version TODAY

php versions

Wondering whether you should upgrade your WordPress hosting to a newer PHP version? 

Most people don’t give it much thought and go on using the older version because they think they’re alright with that. 

And well, they aren’t wrong. In most cases, sticking to an older PHP version is perfectly okay. However, in some instances where upgrading your WordPress host could improve your site’s performance and make it faster. 

To make things easier, we have compiled this blog post, explaining everything you need to know about upgrading your WordPress host to a newer PHP version. Keep reading!

What is PHP?

PHP is a programming language that enables developers to create dynamic content that interacts with databases. PHP can be used on all major operating systems, including Linux, many Unix variants, and Microsoft Windows. It is available free of charge.

PHP originally stood for Personal Home Page, but it now stands for the recursive acronym PHP: Hypertext Preprocessor.

PHP code is embedded into HTML and can be used to create websites and web-based applications.

Why is this important?

Many web developers utilize PHP, which is an open-source server-side scripting language. It’s also a general-purpose language that may create various applications, including GUIs (GUIs).

PHP is mainly used to create web servers. It works in the browser and may also be run from the command line. You can see your code output in the terminal if you don’t want to show it on the browser.

PHP is one of the most popular scripting languages on the web. If you are using WordPress, you are using PHP.

In fact, According to W3Tech, PHP is used by 77.4% of all the websites whose server-side programming language we know. That’s almost 8 out of 10 sites.

WordPress and  PHP Problem

Many sites, organizations, hosting providers, and developers aren’t supporting the latest versions of PHP, which is a major issue in the WordPress community. It’s quite aggravating, especially given how simple it is to update!

I strongly believe that all WordPress users should upgrade to the most recent PHP version as soon as feasible. Not only will updating enhance your site’s speed and performance immediately, but it will also give security and compatibility benefits. As a bonus, the most recent PHP version will assist you in fixing a sluggish WordPress admin.

According to WordPress.org statistics, 52.2% of WordPress sites are on PHP 7.4. The problem? 

According to W3Tech, WordPress is used by 64.1% of all the websites whose content management system we know. This is 42.9% of all websites, about 400+ million WordPress sites, and only 52.2% of these sites have upgraded to 7.4.

Why Can’t I Use an Old Version of PHP Forever?

You’ll find yourself in more and more instances when things don’t work as they should. Think of how Windows 11 launched; half of Windows users still use Windows XP.

More recent PHP versions are ‌more secure, have fewer flaws, and run your scripts faster. Of course, another way of saying that previous PHP versions are insecure, buggy, and slow.

People who build scripts (including WordPress plugins and themes) rarely utilize older PHP versions and rarely test their programs on them. 

If you continue to use an old PHP version, your site will likely break when you update or install a plugin that has never been tested with the old PHP version.

In some cases, hosting providers will stop using older PHP versions and default the most used PHP version, such as PHP version 7.4, as the new default.

Which Version of PHP is the Most Current? 

WordPress now advises that you upgrade your PHP version to at least 7.4. This isn’t essential, but earlier versions may have passed their end of life, which means bug patches and security updates are no longer available.

What Is the Lifecycle of PHP?

All PHP versions have a three-year lifetime, after which they will no longer be maintained.

Typically, a PHP version is supported for around two years after its first release. After then, there will be 1-2 years of security support, with only significant security concerns receiving updates. The next PHP version is already available during this period.

According to the official PHP website, one PHP version becomes obsolete yearly: in 2022, three versions are currently supported: 7.4, 8.0, and 8.1. 

BranchInitial ReleaseActive Support UntilSecurity Support Until
7.428 Nov 20192 years, 5 months ago28 Nov 20215 months ago28 Nov 2022in 6 months
8.026 Nov 20201 year, 5 months ago26 Nov 2022in 6 months26 Nov 2023in 1 year, 6 months
8.125 Nov 20215 months ago25 Nov 2023in 1 year, 6 months25 Nov 2024in 2 years, 6 months

Source: https://www.php.net/supported-versions.php

It’s worth noting that only 8.0 and 8.1 were receiving active support: “an actively supported release.” Bugs and security vulnerabilities are repaired, and point releases are released regularly.

While 7.4 is the recommended and most used PHP version, it only provides security updates, not active support. 

As shown in the chart above, a PHP version is secure for an average of three years before requiring an upgrade.

When a PHP version approaches end-of-life, it is no longer supported and is thus no longer secure to use. You can discover which PHP versions are presently supported on the PHP website.

Why Many WordPress Sites Still Use Older Versions of PHP?

There are other reasons why websites continue to function on obsolete and unsupported PHP versions, but these are the most typical.

1. Website owners are either unaware or unconcerned.

For many site owners, especially those who aren’t technically savvy, the most important thing is that their site is up and running, functions well, and looks good. Why would they want to upgrade their PHP version if they don’t have to?

In many circumstances, developers and web hosts must persuade site owners to upgrade (for their benefit!).

2. It takes a lot of time for plugin and theme developers.

Upgrading to the newest PHP versions for developers using older plugins and themes requires updating their code and intensive testing to assure compatibility. They don’t want to damage their users’ websites, after all.

3. Web hosts dislike seeing their clients’ websites go down.

The bottom line is that web hosting firms do not want to ruin their customers’ websites. Even though PHP 7.0 was released in 2015 and PHP 7.4 is about to end of life, web hosts have put off updating their servers to the latest versions of PHP (8.0 or 8.1) because of the potential to break plugins and themes.

As mentioned earlier, with WordPress powering 64.2% of all websites, there are many support tickets if web hosts push updates and things go wrong.

This implies that if you want your site to function on the most recent version of PHP, you’ll have to either upgrade it yourself or ask your hosting company to assist you.

What Are the Benefits of Updating Your PHP Version?

Yes, there might be many reasons ‌you do not want to update your PHP version. However, you will undoubtedly profit from the new features that were missing in the previous version of the upgrade.

PHP updates usually include several improvements, most of which are related to performance, compatibility, and security. For instance, consider the following:

  • Code that is easy to read and understand.
  • Improvements to the error-handling and script-resolution processes
  • Security enhancements that make your website less vulnerable to hackers

The following are the primary advantages of updating your sites to the most recent PHP version:

Increased Security

The most important benefit of keeping PHP updated is security. 

As previously indicated, security updates for prior PHP versions are no longer available. This means that known vulnerabilities in that version have not been fixed, leaving your site susceptible to attacks.

Running the latest version of PHP ensures that your site is protected against vulnerabilities identified in older versions of PHP.

With each update, you’ll be safer on the site since the current version will be fully supported and patched for ‌all security flaws.

Once previously stated, as versions reach their end of life, they no longer get updates and fixes, leaving your project vulnerable to attacks.

For example, here’s an eye-opener: according to security vulnerability datasource CVE Details, with 2016 having the most attacks, you can see a huge decline in vulnerabilities year over year due to hosting providers’ recent changes to defaulting PHP version to the most active and supported 7.4 version:

These vulnerabilities include DoS, code execution, SQL injection, XSS, and many other exploits.

Regarding types of vulnerabilities, denial of service, overflow and execute code are at the top of the list. These security dangers can be avoided with an update, but if you don’t upgrade, you’ll have to be extra vigilant about them. 

The longer you delay upgrading PHP, the more money it will cost you: incompatibility between your website and hosting demands, security requirements, and other issues will grow serious and expensive to fix.

PHP upgrades are thought to be just as important as a strong password, a secure connection, and a trustworthy hosting firm for website security.

Speed and Performance

What happens if a website’s version is outdated? First and foremost, its general performance is substantially poorer than it might be on a newer version.

If your site is using an older version of PHP, switching to the most recent version will offer instant performance gains—far more than any fiddling around the margins of your WordPress site will.

Things that you have worked hard to attain better web performance will appear as soon as you upgrade your PHP version. Everything would improve when you updated, from latency rates to handling more requests per second.

How is this possible?

Preloading and syntactic features, for example, are new capabilities in PHP that might help you implement certain functionality better and faster. Still, they are not accessible in the present old version.

Kinsta, a web hosting company, has also just released speed benchmarks comparing PHP 7.2, PHP 7.3, PHP 7.4, PHP 8.0, and PHP 8.1.

Their findings show that PHP 8.1 was 47.10% faster than PHP 8.0, and compared to PHP 7.2, it can handle more than 50% of requests (or transactions) per second.

Compatibility and Support

Another important reason to use the most recent version of PHP is compatibility. Like any other software, developers will only support previous versions for a limited time. Older iPhones, for example, are incompatible with the most recent version of iOS, leaving them completely unusable.

Consider it from the standpoint of the developers, who are the ones that create plugins and themes for each version. They’ll be interested in spending their full time and attention on creating a product compatible with a newer version to future-proof their business, compared to creating a product that they need to update later. 

Also, if you have an older PHP version and the new plugin or theme you’ve installed has issues, the developer will not fix an issue for an older version when the newer PHP version is compatible with their plugin or theme.

This is because actively supporting outdated software and preserving backward compatibility is expensive, especially in terms of time for plugin and theme developers. They want to go forward with adding new features, as well as security and performance improvements, to their products, but maintaining older versions of PHP is holding them back.

How to Check Your Current PHP Version

Before considering upgrading your PHP version, you should check which PHP version is currently supporting your website. If you’ve installed WordPress 5.0 or higher, you can view your PHP version in your dashboard.

First, go to Tools > Site Health:

On the Site Health page, click on Info:

Here, you should be able to see your current PHP version under the Server section:

Alternatively, if you do not have WordPress 5.0, you can install the Health Check & Troubleshooting plugin:

Check PHP Version With cPanel

Log in to your hosting account and open cPanel if your hosting provider uses it. Click Select PHP Version: in the Software section.

You can see which PHP version you’re currently using:

Should I Upgrade to PHP 8.1 When WordPress Recommends 7.4?

So, what PHP version should you use? If you currently have 7.4 (recommended by WordPress), why should you upgrade the 8.1? If you want to take advantage of the latest features, better error handling, enhanced RFCs, and optimizations, you should update PHP 8.

PHP 8 will be supported through November 2022, with security support continuing through November 2023. Because of its endurance, the latest version is far more reliable and secure than prior versions.

How to Upgrade PHP Version For Your WordPress Site

If you are not utilizing an earlier version of PHP, you do not need to make any changes. You should do a few things before changing your PHP version if you notice it is outdated.

Backup Your Site

To begin, think about backing up your website. You may roll back your PHP version and restore your site to the previous backup if something goes wrong. 

To be cautious and guarantee that there are no difficulties with your live site, it is preferable to upgrade your staging site first before upgrading your production site.

You can use cPanel or your favorite third-party backup WordPress plugins. However, sometimes, you might have to upgrade your original website version and not your staging site.

Create a Staging Site

Updating your PHP version might cause software incompatibilities on your site. As a result, it’s a good idea to test the update in a staging area first. Instead of damaging your live site, this offers a distinct, secure environment to make modifications.

Many hosting companies allow you to construct a staging site using your control panel. 

You can set up your staging site in minutes. Go to Scripts > WordPress in your control panel.

After that, select Create Staging Site:

This will create an automatically generated subdomain for your staging site. You may now change your PHP version without having to edit your live site.

Upgrade PHP using cPanel

If you have cPanel access to your site, you can log in to cPanel and alter the version of PHP there.

Scroll down to the Software section and choose “Select PHP Version.”

Choose the PHP version you wish to use on the following screen and click “Set as current.”

That’s all there is to it. Refresh your site to ensure everything is running properly; however, if you verify compatibility, your site should be OK.

Requesting PHP Upgrade from Your Web Host

Contact your web host if you do not have access to cPanel if it indicates that you must contact them to modify it or if there is another very straightforward way to upgrade PHP. The upgrading procedure should be simple for them and have no impact on your site.

To make things easy for yourself, copy and paste the following email request:

I’m running a WordPress site on one of your servers and WordPress.org recommends PHP 7.4 as the required version of PHP on their requirements page: 

https://wordpress.org/about/requirements/

Could you let me know if you support PHP 7.4 and how I can upgrade?

Looking forward to your reply.

If your host makes upgrading difficult or refuses to do it for you, it’s time to look for a new host.

How Can You Tell Whether the New PHP Version Is up and Running?

If everything looks to be running and showing correctly on your WordPress site, as we have shown you how to check your PHP version, your updated PHP is ‌working. If any difficulties or an update is necessary, you may see them mentioned in your WordPress dashboard’s Site Health function.

It’s also necessary to check the PHP compatibility of your themes and plugins to guarantee that a PHP version works with your site. 

If I Upgrade PHP Version, How Will This Affect My Website?

The answer depends on how your website was created. 

You won’t notice much difference after updating PHP, but your site could be ‌faster. Problems are unlikely if you use plugins and themes that have recently been updated.

If you use obsolete PHP-coded plugins or themes not supported by current versions of PHP, your site may throw problems and perhaps cease operating completely. 

For instance, if you haven’t updated your theme or plugin to the most recent version, or if your website employs custom code for which there isn’t a widely available update. You’ll need to adjust the code to make it compliant in such instances.

How to Look for Conflicts After Upgrading to Newest PHP Version

After updating your PHP version, we recommend checking your plugins and themes for conflicts. 

Upgrading PHP can cause issues like the White Screen of Death and 500 internal server errors.

Check the front end to determine whether everything works properly and whether you upgraded a staging environment or your live site. If you encounter any issues when surfing the website, you must investigate the problem.

A plugin conflict is a typical cause of WordPress errors.

If you have upgraded PHP on your live website and can visibly see that your website has a lot of issues, reactivate each plugin one by one to find the conflicting ones if you can access your WordPress dashboard. 

You can use the Health Check & Troubleshooting to identify any plugin conflict if there are minor issues. You can use their Troubleshooting feature on your live site so that it does not affect visitors on your site when you are disabling each plugin:

You can enable one plugin at a time and see which one is causing the issue:

Otherwise, if you are using a staging site, disable each plugin.

By disabling plugins and themes one by one, you can identify if each of the plugins disabled is a comparable plugin or a bad one.

You may need to update your wp-config.php file if you have further issues, such as exceeding maximum execution time or maintenance mode errors. This approach may need additional in-depth debugging, such as raising your PHP memory limit.

What if You Update PHP and Then Have Problems?

Try the following remedies if your favorite and indispensable plugin or theme is having issues with PHP 8.

  • Revert to the old version of PHP. 
  • To get the best user experience with the newest versions of both, contact the theme or plugin’s support team and let them know about the compatibility difficulties.

If speed is the major factor, we highly recommend using speed optimization tools to enhance your web performance and improve your PageSpeed Insight Score. 

You can also use many security plugins, such as Sucuri, to help with any attacks on your site. Even so, we encourage you to spend some time tackling this issue. As each year passes, your older PHP version will become obsolete. 

Publish Changes to Your Live Site

Once you’ve identified that your site is free from conflict, you can publish your staging site to live. You can clone your staging site to your live site: 

Conclusion

It is important to upgrade to the most recent version of PHP because it will improve your site’s performance immediately and safeguard your site from security vulnerabilities discovered in previous versions of PHP.

Before upgrading your website, you should ensure that it is compatible with the PHP version you want to use and that you have a backup. You can test it on a staging version of your site before updating your main site.

If you come across web hosts, plugins, or theme developers who make upgrading PHP difficult, you should move to a compliant server or product. This will pressure hosts and developers who aren’t using the latest versions to update.

© Copyright Linkilo.co 2022. A Product by  SEO RANK SERP LLC | Privacy Policy | Terms and Conditions