Magento is a popular open-source Ecommerce platform. It is built with a popular programming language – PHP.
PHP(Hypertext Preprocessor) is used by nearly 80% of all websites as a server-side programming language. Basically, 8 out of 10 websites you come across on the Internet are using PHP.
With such popularity, PHP has a highly active community of developers. Their open-source community regularly contributes to extending and improving the PHP language.
That’s why we get the regular PHP update.
But the language getting an update is not equal to the application that is getting an update. Some applications support several versions of PHP, while others support different PHP versions.
What are PHP Versions?
PHP Versions are stable releases of PHP. The engineers constantly update the language, optimizing syntax for performance and speed.
After reaching a stable state of PHP – better than the previous one – they released it.
The platform running on PHP has to update its PHP version to utilize the performance of the latest version.
An app, program, and software run on specific PHP versions. Developers have to update the software to make it compatible with the latest PHP version.
So, if you use the outdated version of any software, you may have to install the different versions of PHP that the product supports.
Why Changing PHP Version for Magento?
When working on Magento, you may encounter events requiring a PHP version change.
- Updating the Magento platform, hence updating the PHP
- Changing PHP to check the functionality of outdated extensions
- Uploading the old backup, therefore, outdated PHP version is needed
Moreover, 90% of Magento websites are running on unsupported PHP versions. After some time, PHP will drop the support on outdated PHP versions, and hackers will utilize the vulnerabilities to steal your store’s data.
Not only security, but you are also missing the performance improvement, speed, and scalability if your Magento store is on an outdated PHP version.
Note: Take a proper backup before changing the Magento PHP version.
Magento 2 PHP Version Compatibility
|7.1, 7.2, 7.3
How to Change Magento PHP Version?
To change the Magento PHP Version, you have to log in to your hosting account.
- Login to cPanel/Plesk or whichever panel you got from your hosting account
- Navigate to PHP Version Manager
- Go to the directory you would like to change the PHP version for (please note that this change applies to subdirectories for it also)
- Click on the directory name.
- Select the desired PHP version
- Click Save to save the changes
How to Change Magento PHP Version with Breeze?
At Breeze, we strive to make things easier for Magento developers and store owners. You can change the PHP version from your Breeze dashboard.
Follow the steps to change the PHP version of the Magento store.
- Follow the steps to change the PHP version from the platform.
- Login to your Breeze Platform
- Select the ‘Company’ you like to work on
- Click on ‘Sites’ to open the site list
- Open the ‘Store’ you want to work on
- Go to the ToolBox
- Find the PHP Version box, and change it
Check the PHP Version
Check the following command to verify the PHP version:
$ php --version
Changing the PHP version is a small thing but an essential action in Magento management.
In this short tutorial, I showed you how to change the PHP version for the Magento store. If you encounter any issue and want our help, please leave it in the comment section.