“Supported Magento 2 PHP versions” or “supported Magento PHP versions” refer to PHP versions compatible with each version of Magento 2. Since a PHP version was not developed to be used in every Magento version, this is an aspect that requires your attention whenever it comes to Magento version update.
Through this blog, let’s go through the most frequently asked questions about Magento 2 supported PHP version.
As you know, PHP is a programming language used for website operation. As the language is open source, it is free to use. This is also why PHP is one of the most popular languages for website development and contributes to the development of various platforms, WordPress, Facebook, Google, Yahoo!, etc.
The following table will give you an overview of currently-supported PHP versions with a timeline:
For a visualized calendar, the below image will make it more or less readable:
- Green >> Active support: A release that is being actively supported with security issues are fixed and regular point releases are made.
- Orange >> Security fixes only: A release that is supported for crucial security issues only. Releases are only made on an as-needed basis.
- Red >> End of life: A release which is not supported anymore, so users should upgrade as soon as possible to avoid unpatched security vulnerabilities.
PHP 8 has been officially released on November 26, 2020 and become the latest PHP version.
In Magento, PHP plays an important role as the middle-man that pulls the data from your database, converts it into HTML and CSS so the browser can read it and finally serves visitors with the final site. If this element is sluggish, it also impacts the website performance.
2. Why Should You Use A Supported Magento 2 PHP Version?
What does “supported PHP version” mean? Indeed, it’s not about a PHP version compatible with a version of M2 (Magento 2 compatible PHP version) but the ones actively supported by PHP. At the moment we introduce this post, they are PHP 7.3 and 7.4.
Like an evident truth, later versions always come out with enhancements while old ones gradually become obsolete. Furthermore, most new programming solutions are probably based on the latest versions and lack backward compatibility for outdated ones. Accordingly, your website should run on one supported (if not the latest) PHP version because of two basic reasons: security and performance.
Improve website’s performance
Better efficiency is one of the most important reasons that we need to keep everything up-to-date. Moving to the latest supported PHP version (currently PHP 8) is the right thing to do for a significant performance increase, which finally levels up your store to 3 or 4x faster version.
Consolidate website’s security
If these sites fail to update the supported PHP version, they are vulnerable to hacking events. Therefore, if such security vulnerabilities are uncovered, there will not be a patch to fix the issue, it will be left untouched. Furthermore, most themes, extensions, plugins, and WordPress itself will stop working with unsupported versions of PHP.
3. Why are So Many Websites Still Using Unsupported Magento PHP Versions?
A report by Sanguine Security (operated by one of the household names around ecommerce and Magento security topics – Willem de Groot) disclosed that less than 10% of all Magento websites out there are using one of the supported PHP versions. Why is this number super slow?
The main reasons commonly fall under two categories:
- They didn’t see value in spending money on this: The first one is very common as very few merchants have somewhat of a “security budget.” Some of this can fall under the “continuous maintenance” item. Yet, more often than not, things like these are set aside. And then they are simply forgotten as they run their business as usual.
- They weren’t aware this was an issue at all: Besides group 1, there is a vast number of Magento websites that don’t have quality development or business support outside their available team. As a result, many store owners handle several tasks on their own and only ask for help when something goes wrong. So, it does not blow up our mind that 90% of stores are running on an unsupported PHP version.
4. The List of Compatible Magento 2 PHP Versions
Magento version updates may require you to switch to new PHP versions to make them compatible. The below table summarizes different PHP versions and relevant Magento versions that support them (compatible Magento 2 PHP versions).
- Only 7.0.2 and ~7.0.6 for 2.1.0-2.1.1. Starting with 2.1.2 that was expanded to include 7.0.4.
- 7.0.2, 7.0.4, and ~7.0.6 for 2.2.0-2.2.4. Starting with 2.2.5 7.0 support was limited to ~7.0.13
- Supports ~7.1.3
- 2.4 supported versions are based off “2.4-develop-php74” branch which is combined to be merged before release
5. How to Check The Current PHP Version of A Magento Site?
Is your Magento website operating on one of the supported PHP versions?
You can easily check your website’s current PHP version by logging in to your hosting control panel. If you have SSH access, you can review the version using the following command.
Besides, you will find plenty of online tools for this purpose, such as WhatRuns, BuiltWith (premium feature). You can even contact your hosting provider to ask them what PHP version is used on your site.
However, you’d better check it yourself by directly logging into the control panel because this job is effortless.
6. How to Keep Websites Secure if You’ve not Moved to Magento 2?
As officially noticed, the support for Magento 1 has ended forever since July 2020, which means that potential risks are threatening Magento 1 websites.
So, how do you secure your Magento 1 website?
Among PHP 7.x versions, Magento 1 is compatible with PHP 7.2 only. Unfortunately, the active support for PHP 7.2 has officially stopped from December 2020. And there’s no way to upgrade your PHP version in your M1 site to 7.3 or 7.4 version.
>> Moving to Magento 2 is the only way. But the most recommended practice than anything else is to migrate your store to the latest version of Magento 2 and take advantage of the newest security fixes.
As you know, Magento 2.4 has recently been released as the newest Magento 2 version that supports PHP 7.4 (the latest supported PHP version). Hence, switching your Magento 1 site to Magento 2.4 will give it the best protection against possible attacks and take it to a new level of performance.
Once the checkout process has been optimized and its loading speed no longer depends on the number of payment/shipping methods, for example, this will finally level up the customer experience and allow your store to have the edge over competitors. However, since Magento 2 follows a vastly different architecture and codebase, it is not a one-shot upgrade. The migration process is almost the same as building a new Magento 2 store.
QUICK MOVE NOW! Have your site migrated safely by Magento 2 Migration experts!
7. Where to Get Help for Magento 2 PHP Version Updates?
If you can update the PHP version yourself, congratulations!
But if you have difficulty moving to a Magento 2 supported PHP version, there are 2 parties that you can ask for help. And this section is for websites using Magento 2, of course. If you still run a Magento 1 store, don’t delay migrating it now!
In many cases, your hosting provider may offer support for updating PHP versions. But this is not always. If they do not support it, go for a Magento 2 maintenance agency.
Magento 2 Maintenance Agency
Since PHP versions are closely related to Magento versions and need to be compatible with them, an agency with full Magento services like BSS Commerce surely supports PHP version updates.
With Magento 2 Maintenance Service, we will upgrade your store to a superior Magento version as you require or even the latest one along with the latest security patch for better protection to your system. In case you are using an unsupported PHP version, we can help to take it to a relevant Magento 2 supported PHP version.
Additionally, you can give your online store time for the following purposes, which specifically important before peak seasons or promotion programs:
- Overall health checkups and fixing bugs
- Performance optimization
- Addition of new features
GET FREE CONSULTATION with Magento 2 Maintenance experts for security enhancement and performance optimization.
Using a support a Magento PHP version or Magento 2 PHP version is not difficult to do but really benefits Magento websites. Though its benefits are not always realizable, you cannot predict what would happen if you don’t do that, for example, your website may be attacked due to security gaps.