How to Change PHP Version of Your Website on Hostinger
In this article, we will show you how to change the PHP version by using the Hostinger hPanel. Let’s start!
Download Guide To Using Hostinger
Why We Should Change the PHP Version
Each script or piece of code that you enter on your site has some requirements to meet to execute properly. The PHP version is one of the factors. Updating your PHP to the latest version will not only help run your commands smoothly, but it will also increase your site’s loading speed, performance, and security.
As the PHP language itself is continuously being updated, most popular content management systems like WordPress and Joomla quickly adopt these changes and suggest their users switch to newer PHP versions as well.
Changing PHP Version in Hostinger
Currently, Hostinger’s control panel supports PHP version 7.1 and above. If possible, it’s recommended to use the latest version available. This way you get to benefit from both the performance and security improvements that come with the updates.
It’s worth noting, that while in this example we will use the hPanel, the process for alternative control panels, like cPanel, is quite similar.
To easily change the PHP version on the hPanel:
- Login to the hPanel, scroll down to PHP Configurations under the Advanced category.
- Then, select the version of PHP you want to use from the menu and click Save.
- That’s it! Now you can go back to the hPanel and check if the changes have been updated in your control panel statistics.
Important! We recommend checking the requirements and compatibility of the scripts, plugins, and themes you use before choosing which PHP version to use for your website.
Conclusion
There you have it. Now, you know how to change the PHP version on Hostinger’s hPanel! This skill will help you more efficiently manage how your site works and will give a better understanding of plugin and script compatibility. If you have any questions, let us know in the comment section.
Comments
January 12 2018
When will you support php 7.2?
January 15 2018
Hey king, Support for PHP 7.2 should be added in near feature. Our devs are already testing it
September 09 2020
I'm just follow these steps, but my wordpress still saying that I use PHP 5.6. Whats wrong ?
November 11 2020
Hey there Gabriel. Make sure to press SAVE on the bottom, and clear your browser cache before checking again. The PHP version should show correctly.
November 19 2020
I followed the steps and everything seems to be working perfectly but when I ssh into the my hosting and check the php version it still shows the old php i had before. Is there a different method for ssh?
February 09 2021
Hi there! You can also use this method of creating a phpinfo file to check the current version of your PHP as well as other PHP settings ;)
January 01 2021
php 8??
February 09 2021
Hi there! System administrators are currently testing PHP version 8, so it should be ready for shared and cloud servers fairly soon!
April 26 2021
Hi! Which PHP versions are available in cPanel ?
May 06 2021
Hi Fred, The cPanel default profile includes PHP versions 7.3, 7.4, and PHP 8. EasyApache 4 supports PHP versions 5.4 through 5.6, PHP versions 7.0 through 7.4, and PHP 8.0. Note that if your server runs CentOS 8, you cannot use PHP 7.1 or earlier.
July 05 2021
My application in the PHP version 5.1, if I move it to the latest then it does not support. Whereas I believe that it should not have problem from lower to higher versions. Please let me know how I can run my applications.
September 16 2021
Hi there! This will depend entirely on the code on your application - if the code is written in a way, which is not compatible with the newer version (often happens with custom code), after updating the PHP version, the app will break. So before updating the PHP version, you'd need to make sure that every piece of the code is compatible with the new version. You can have a look at this article to help you test your code's compatibility with PHP 8.
December 10 2021
How can i change php version for subdomain only?
December 14 2021
Hi Milan, you can use this solution to change PHP version for subdomains :)
January 24 2022
I created a subdomain. But I wanted it to have a different version of PHP. Can I change it without affecting my main one?
January 25 2022
Hi! Yes, you can change it through .htaccess file - as long as it's inside of your subdomain, it will not affect the main domain. Check out this guide on how to change the PHP version for your subdomain :)
March 31 2022
Hello I have a prestashop service that uses PHP 7.1, do you support it, if so until when ???
April 06 2022
Hi Aldo, you can still enable the 7.1 version, though it doesn't get updates anymore, so it's not recommended. If you specifically need it though, you can do it from your hPanel -> PHP Configuration; then select "Show no longer supported PHP versions"