A Complete Guide for End-of-Life (EOL) and PHP-Supported Versions in 2023
PHP has become integral to the web development industry. Its popularity is undeniable, with over 77.6% of websites that use a server-side programming language utilizing, PHP. It's used by individual developers and plays a crucial role in the WordPress ecosystem, powering the entire CMS. However, despite its widespread usage, many businesses, developers, and hosts have fallen behind in supporting the latest PHP versions.
Shocking statistics reveal that many websites still use outdated PHP, exposing themselves to security risks and suboptimal performance.
This article will explore the importance of using the latest PHP and provide a complete guide for end-of-life (EOL) and PHP-supported versions in 2023. Also, as an as needed basis, we will cover the risks of using outdated versions, the benefits of using the latest supported versions, steps to upgrade PHP versions, and frequently asked questions.
By the end of this guide, you will clearly understand why staying up-to-date with the latest version is important.
-
- Understanding the Active Support Lifecycle and EOL
- The Evolution of PHP Versions
- The PHP 7.4 Support Lifecycle
- Negative Consequences of Using PHP 7.4 Past EOL
- Reasons Why You Should Update PHP
- Make Sure Your Host Supports the Latest PHP Versions
- 5 Key Benefits of Updating to PHP 8 For Your WordPress Site
- How to Check the Current PHP Version of Your WordPress Site?
- How to Update Your PHP Version?
Understanding the Active Support Lifecycle and EOL
PHP, like any software, has a full support lifecycle. It goes through different phases, from initial release to its eventual End-of-Life (EOL). Understanding the active support lifecycle and EOL PHP version is essential to ensure you use the most secure and updated.
The active, long-term support and lifecycle for PHP begin with the General Availability (GA) release date. The GA release date is the first stable release of a new version and is supported for two years. During this long-term support period, PHP receives security patches and updates for security risks and bug fixes, and they are released in regular point releases, ensuring the update is secure and functional.
After two years, a minor release of PHP enters the Security Support phase, where only security fixes are provided for minor releases for an additional year. The security support phase of a minor release is called the "Security Fix Only" phase. Upgrading to a newer version is highly recommended during the security support phase of a minor release, as it will no longer receive bug fixes.
End-of-Life (EOL) Complications
After three years, PHP reaches its End-of-Life (EOL) and is no longer supported. No further updates, including security patches and bug fixes, are provided, leaving the software vulnerable to known and unknown critical security issues. It is imperative to upgrade to supported versions before EOL to receive security patches and ensure your website or application's continued security support and functionality.
The Evolution of PHP Versions
Here, we will provide the list of major versions of all the websites' PHP versions released until now and currently supported versions.
Source: WordPress PHP Stat
PHP 1 (1995): This was the initial release of PHP, created by Rasmus Lerdorf. It was a simple set of Common Gateway Interface (CGI) scripts written in the C programming language for his personal use.
PHP 2 (1997): It was a complete rewrite of PHP 1 and introduced several new features, including support for dynamic HTML generation and database connectivity.
PHP 3 (1998): It added support for object-oriented programming (OOP) and improved support for Windows operating systems.
PHP 4 (2000): It introduced performance improvements and new features like the Zend Engine, a scripting engine that provides a high-performance execution environment for all PHP applications. PHP 4 is no longer under development, and no major versions or security updates will be released.
PHP 5 (2004): This was a significant upgrade to PHP 4, adding support for several new features such as exceptions, iterators, and improved OOP support.
PHP 5.6 (2014): PHP 5.6 was released in 2014 and was the last update of PHP 5. x series. It introduced features like constant scalar expressions, variadic functions, and argument unpacking. Extended support for PHP5.6 was provided until the end of 2018.
PHP 6 (development halted in 2010): PHP 6 was intended to add support for Unicode and new database features, but development was eventually halted due to technical and community challenges.
PHP 7.0 (2015): This last major release of the PHP version introduced updates for improving performance, including a new edition of the Zend Engine, which made it much faster and more efficient. It also introduced new features such as scalar-type declarations and the spaceship operator.
PHP 7.1 (2016): It was released in 2016 and added features like nullable types, iterable types, and catch multiple exceptions. Extended support for this PHP 7.1 was provided until the end of 2019.
PHP 7.2 (2017): This major PHP version introduced features like object type hinting, the count() function supporting arbitrary expressions, and support for negative string offsets. Extended support for PHP 7.2 was provided until the end of 2020.
PHP 7.3 (2018): This version added features like trailing commas in function calls, flexible heredoc and nowdoc syntax, and improved performance for variable assignment. Extended support for 7.3 was provided until the end of 2021.
PHP 7.4 (2019): This last version of PHP 7.4 version introduced features like typed properties, arrow functions, and the ability to use curly braces to define functions. Extended support for PHP 7.4 was provided until the end of 2022.
Currently Supported Versions
Source: PHP Supported Versions
PHP 8.0 (2020): PHP 8.0 added several new features and improvements, including just-in-time (JIT) compilation for faster execution, union types, and named arguments. It also introduced breaking changes for some older code, so developers must be aware of these changes when upgrading.
PHP 8.1(2021): PHP 8.1 is a major update of the PHP language released on November 25, 2021. It includes several new features, such as read-only properties, fibers, enums, performance improvements, intersection types, and more.
PHP 8.2 (2022): PHP 8.2 marks a significant milestone in the evolution of the PHP programming language, as it introduces an array of novel functionalities. These include read-only classes, phased-out dynamic properties, standalone null, false, and true types, and notable performance enhancements.
The PHP 7.4 Support Lifecycle
PHP 7.4 was released on November 28, 2019, and it introduced numerous new features and performance improvements over the previous one,3. As discussed above, like all software, the active support phase for versions is finite, so keeping track of when a version will reach its end-of-life (EOL) is essential. The EOL date is when the version will no longer receive active support or security patches and updates, leaving it vulnerable to potential security issues.
For PHP 7.4, the active support phase ended on November 28, 2022. PHP 7.4 will no longer receive security patches, security support, the end of life active support phase, or bug fixes from the PHP community. This means that users who continue to run PHP 7.4 after its End-of-Life date are at risk of exposing their applications to security vulnerabilities and other security issues.
Upgrading to a newer version before its end-of-life date is recommended to ensure your applications remain secure and up-to-date. This will help ensure you continue to receive updates for critical security issues and bug fixes as they become available.
Negative Consequences of Using PHP 7.4 Past EOL
Using PHP 7.4 past its end-of-life (EOL) date can negatively affect your WordPress site or PHP applications. Here are some of the potential risks:
-
Security vulnerabilities: As PHP 7.4 has reached its end-of-life date, it will no longer receive security updates, which means that any security vulnerabilities discovered in the software will not be patched. This can leave your website or PHP applications vulnerable to attacks from hackers or other malicious actors.
-
Compatibility issues: As newer versions of PHP are released, web hosting providers may stop supporting older versions, making it difficult or impossible to find a hosting provider that supports PHP 7.4. Additionally, newer versions of PHP may introduce new language features incompatible with older versions, which can cause errors or compatibility issues when running older code.
-
Reduced website Stability: PHP 8 is a major release with several new features, components, and configurations. Unlike its old version, PHP 7.4, it has not incorporated any legacy functionalities. Therefore, if you're using PHP 7.4 and upgrading to the latest WordPress 6.1, you may experience reduced application stability because the WordPress site has undergone several modifications to align with PHP 8's compatibility requirements.
-
Lack of support: When software reaches its end-of-life date, developers and support teams may stop providing active support for that version. This means if you encounter any issues or bugs in your code, you may be unable to find help or support to resolve them.
-
Missed features and improvements: By continuing to use PHP 7.4 after its end-of-life date, you will miss out on any new features or improvements introduced in the latest versions of PHP. This can put you at a competitive disadvantage if your competitors are taking advantage of these new features.
Using PHP 7.4 past its end-of-life date can lead to security vulnerabilities, compatibility issues, lack of support, and missing features and improvements. It is recommended to upgrade to a newer version of PHP, as PHP 7.4 has reached the end of its life cycle, to avoid these risks.
Reasons Why You Should Update PHP
For your website, updating to the most recent update of PHP offers many advantages, such as increased exposure and better support. You should update PHP for the following five reasons:
-
Bug Fixes
Every PHP includes bug fixes that increase the language's functionality and stability. You may ensure your website operates smoothly without hiccups by updating to the most recent version of PHP.
-
Enhanced Security
Older versions can open your website to unpatched security vulnerabilities, making it more straightforward for hackers to find and exploit holes and compromise your site. The risk of a security breach is decreased by updating to the most recent update of PHP, which gives you access to the newest security features and encryption standards.
-
Active Support
Eventually, older versions acquire end-of-life status, which indicates that the PHP group no longer supports them. Finding assistance or solutions for potential problems or staging an environment may become challenging. By updating to the most recent version of PHP, you can be confident that you have access to live community assistance and resources like bug patches, security upgrades, and new features.
-
New Features
The functionality, performance benefits, and efficiency of the language are improved with every new update of PHP by adding new features and making other tweaks. An improved user experience for website visitors can result from these new capabilities, which can assist developers in writing more effective and efficient code. For instance, named arguments, union types, and attributes are a few of the new PHP 8 features.
-
Performance Improvements
Every new release of PHP includes performance upgrades that speed up and improve the operation of your website. Higher conversion rates, improved user engagement, and quicker load times may result. For instance, a new just-in-time (JIT) compiler is part of PHP 8, which can greatly boost the efficiency of certain types of code.
Make Sure Your Host Supports the Latest PHP Versions
The official WordPress requirements now suggest that the web hosting service should operate on PHP 7.4 or higher. Therefore, you must ensure your host supports the latest PHP versions.
Here are some steps you can take to ensure that your web hosting service supports the latest PHP versions:
-
Check your current version of PHP: Before upgrading, you need to check which version your website is running. You can do this by accessing the control panel of your hosting account and searching the PHP version listed in the settings or configuration section.
-
Research your web host: Find out if your hosting provider supports the latest PHP versions. You can check their website or contact their support team for information about their PHP version support.
-
Upgrade your hosting plan: If your current hosting plan doesn't support the latest PHP versions, you may need to upgrade to a higher-level plan that does.
-
Use a PHP version checker: You can use a tool to check if your website is compatible with the latest PHP update. This tool can scan the code of your website and give you a report on which version your website is compatible with.
-
Test your website after upgrading: After upgrading to the latest PHP update, you should thoroughly test your website to ensure everything works correctly. This includes checking all the features, plugins, and themes to ensure they are compatible with the new version.
By following these steps, you can ensure that your web hosting service supports the latest PHP versions and keep your website updated and secure.
5 Key Benefits of Updating to PHP 8 For Your WordPress Site
Updating to PHP 8 can provide significant benefits if you have a WordPress website. Here are five key benefits of updating to PHP 8 for your WordPress site.
Full Compatibility with WordPress 6.1
The most recent WordPress 6.1 requires PHP 8 for the best performance. By upgrading to PHP 8, you can ensure your WordPress site is fully compatible with the most recent release of WordPress and utilize all of its new features and enhancements.
Reduced Attack Surface
Outdated PHP versions are more susceptible to security risks, which increases the chance of cyberattacks on all websites. By offering improved security features and more reliable encryption mechanisms, updating to PHP 8 can drastically lower your attack surface.
Enhanced Performance
Your WordPress site will operate better overall and have faster load times thanks to PHP 8's considerable speed enhancements improving performance further over the old version. Better user experiences and higher levels of engagement for visitors to your website may result from this.
Improved development experience
PHP 8 provides numerous new features and upgrades that make development more accessible and practical. It offers new grammar features and enhanced error handling, making it easier for developers to produce clean, efficient code.
Lower probability of getting WordPress errors
Incompatible PHP versions are the root of many WordPress issues. By updating to PHP 8, you can lessen the chance of encountering compatibility problems with WordPress plugins and themes and help prevent these errors. Ensuring your website operates without hiccups can save you time and headaches.
Future-proofing your website
The most recent version of PHP is likely needed for WordPress and other web technologies to operate appropriately as new versions are released. Your website will be future-proofed and compatible with new technologies as they are launched if you upgrade to PHP 8 right away.
How to Check the Current PHP Version of Your WordPress Site?
Several methods exist to determine the version powering your WordPress site. If you're looking to discover your site's current version, here are a few ways to do so:
Using the WordPress Site Health Tool
WordPress users running version 5.2 and above can identify their site's PHP version using the Site Health tool.
Navigate to the Tools > Site Health > Info page in the WordPress dashboard and open the Server tab to check your PHP version.
The screen will display your server architecture and web server information and reveal your PHP version, PHP SAPI, and PHP max input variables.
Run a PHP File (DIY)
You can create a PHP info page to display your website's PHP configuration settings, including the current PHP version. Create a new PHP file and add the following code:
<?php phpinfo(); ?>
Save the file as phpinfo.php and upload it to your website's root directory. Then, access the file in your web browser by navigating to http://yourdomain.com/phpinfo.php. You should see a page with detailed information about your PHP configuration settings.
Or you can run the following code using a locally installed PHP version.
php -v
This command will display the current PHP version installed on your server.
Using a WordPress Plugin
You can use WordPress plugins to discover more about your PHP version. "Display PHP Version" is a reliable plugin that allows you to view your current PHP version in the "At a Glance" section of your WordPress admin dashboard.
How to Update Your PHP Version?
Before we discuss how to update your PHP version, we suggest taking a few precautions when deciding to update your PHP version and prevent security risks.
-
Check the minimum requirements: Before updating your PHP version, ensure your website's software and applications are compatible with the new version. Check the documentation or support pages for your website's software and plugins to ensure they are compatible with the latest PHP version.
-
Backup your website: Before making any updates, create a full backup of your website files and database to ensure you have a copy in case anything goes wrong during the update process.
Once you have taken these steps, you can update your PHP version manually. You can either update PHP through the hosting control panel or contact your hosting provider to update PHP for you.
-
Check your hosting control panel: If your hosting provider allows you to update PHP versions through the control panel, navigate to the PHP configuration settings and select the new version you want.
-
Contact your hosting provider: If your hosting control panel does not allow you to update your PHP version, contact your hosting provider's support team for assistance. They may be able to update your PHP version for you or provide guidance on how to update it.
To update your PHP version manually, follow these steps.
Create a Staging Site
To avoid potential software conflicts on your website, testing the PHP update in a staging environment is advisable. This allows you to implement changes in a separate, safe environment without disrupting your live site.
Creating a staging site can be done through your hosting provider's control panel, depending on their services. For this guide, we will be using the DreamHost panel.
If you have a managed DreamHost plan, a staging site can be set up in just a few minutes. Navigate to WordPress > Managed WordPress > Manage in your control panel to get started.
After accessing the Managed WordPress section, navigate to the Staging tab and select "Create Staging Site."
This will create a staging site on an automatically generated subdomain. You can then update a later version of your PHP version without affecting the later version of your live site.
Change Your PHP Version
Most hosting providers can change your website's PHP version through the control panel. The process may vary depending on the host, but you should look for a MultiPHP Manager or PHP Selector option.
For DreamHost Staging sites, you can access the Configure PHP section by scrolling down the page. This section will display your current PHP edition and the most recent update option.
To update on hosts like Dreamhost, Digital Ocean, Vultr or Godaddy: Staging sites, select the "Change PHP" option and choose the latest update, such as PHP 8.1. If the update is successful, the Configure PHP section will confirm that your site is now up to date with PHP 8.1.
Look for Conflicts
It's important to review your website's plugins and themes for any conflicts that may have occurred during the update process. It's not uncommon for issues such as the White Screen of Death or 500 internal server errors to arise after upgrading PHP.
Once the update is complete, visiting the front end of your site is recommended to ensure everything is functioning correctly. If you encounter any errors while browsing the site, you must begin troubleshooting to resolve the issues.
If you encounter errors on your WordPress site, a possible cause could be a plugin conflict. You can start by deactivating all your plugins using the Bulk Actions feature on the Plugins page to troubleshoot.
Then, reactivate each plugin individually to ensure compatibility and identify the conflicting plugin. You can download a similar plugin or delete the problematic one if it is unnecessary.
Publish Changes to Your Live Site
Once you have successfully updated and tested the update on your staging site, it is time to publish the changes to your live website. This can typically be done through your hosting provider's control panel.
For instance, with DreamHost, you can transfer your staging environment and site data to your live site with just one click. However, before doing so, ensure any potential conflicts are resolved. Once you have done this, click the "Publish Staging to Live" button.
Frequently Asked Questions
Is WordPress Fully Compatible With PHP 8?
The answer is that PHP 8, WordPress 5.6, and the latest versions work flawlessly together. Your WordPress website's performance and security can be enhanced by updating to PHP 8.
How Many Teams Are Still Using PHP 7.4?
It is impossible to pinpoint an exact figure; However, recent polls indicate that about 60% of PHP developers are still working with PHP 7.4 or the old version. However, as PHP 8 significantly enhances performance security and offers increased exposure, more developers are expected to switch to PHP 8 shortly.
What is the difference between PHP 7.4 and 8.2?
The most recent version of PHP, PHP 8.2, was released in November 2022. It has a number of new features and enhancements, including a JIT compiler, union types, attributes, named arguments, and enhanced error handling. The previous version, PHP 7.4, published in November 2019, does not have these features. However, testing may be necessary before upgrading to PHP 8, as some older code might not be compatible with PHP 8.
How can I check my PHP version?
You can check your PHP version in several ways, including:
-
Using the phpinfo() function in a PHP file and running it on your server.
-
Running the command "php -v" in the command line on your server.
-
Checking the version number in your server's control panel or hosting account dashboard.
-
Using a PHP version checker tool available online.
Is PHP 7.3 an EOL PHP version?
PHP 7.3 is no longer actively supported or updated as it has reached its End of Life (EOL). This indicates that the PHP development team will no longer provide bug fixes or security patches, leaving websites and apps open to security risks. To keep their website or application safe and up to date, users are advised to upgrade to a supported version of PHP.
What is the current version of PHP?
As of March 2023, the current stable versions of PHP are:
PHP 8.2
PHP 8.1.3
PHP 8.0.17
PHP 7.4.34
PHP 8.0 will only be supported until November 26, 2023, and PHP 7.4 was supported till November 28, 2022. Thus, upgrading to PHP 8.2, which is the most recent and safe version and offers the newest features and improvements, is advised.