How to Upgrade Php Version on CPanel ?

Enver Şanlı
4 min readJan 26, 2021

--

Php Version Upgrade

Hi everyone !

We will discuss how to upgrade php version on CPanel.

You always see Php version on scripts, projects or etc. Maybe you have experienced a Php version mismatch on your projects. If your project and php version is not match, then project will not work or work with errors. When you come upon with this problem, you have a few option to solve that.

If your project developed on old php version, you should upgrade your project. If you do not want to upgrade your project, you need to downgrade your php version. But to downgrade php version does not recommended because you will have more problem in your project’s future. You can not use new technics of Php’s newer versions. Best solution is to upgrade your project like development.

Another possibility is your project developed on newer version but your server has older php version. You can downgrade your project but that’s not a preffered choice. When you come upon something like this problem, best solution is to upgrade your php version.

But How to get current Php Version ?

You have a few options to get your current version. We will discuss one of them to following steps but you can check also with basic php function to your current version.

When you want to check your php version and more details about php, you can use phpinfo(); function. That’s let us to get that knowladge. All you need to go to you index page in your project or create a new file to print that.

<?php
phpinfo();
exit; ?>

When you add those lines to your project, you will see following screen when you call your website. On the corner of result, we see the version.

php_info() function

That’s it all. You can see your current version and more information about that.

If you have Cpanel on your server or hosting provider, that’s so easy to upgrade your Php version. Just you need to find MultiPhp Manager option. It will provide us to uprgrade it so easy !

Let’s see how it happens…

1 . Go To Your cPanel

How to login : yourdomain.com:2083

ıf you add :2083 to end of your domain, you can reach at your cPanel login page.

Now, you need to fill your user name and password then you will be logged.

cPanel Login

2 . Find cPanel

When you fill your username and password, you will see following panel. cPanel give us to manage our hosting with easy and clear options.

Now, you see all option of cPanel on your screen. Now, we need to scroll down to manage Php version of our domain. When you scroll down, you will see “MultiPhp Manager”.

MultiPhp Manager

As you can see, MultiPhp Manager option under the software section. Now, you can click on the MultiPhp Manager and you can see version options for your domain.

Php Version

When you click MultiPhp Manager, first you can see your current version on the corner and your manager recommend something for you.

Now, we will see our domain under page when we scroll. Then, you need to select your domain. You you did not select that, apply button will be disabled, so you should select it.

MultiPhp Options

As you can see, MultiManager provide us general knowladge of domains. I have also sub domain and both of them has same Php version. Let’s upgrade to Php 7.3 my sub domain’s php version.

Upgrade Php Version

Select your domain and version of Php and click to Apply button !

In a few minutes, you will be upgraded your php version ! After that, you can check you new version. Now, you can run your project with it.

I hope it will be helpful for you !

You can like or comment about that and give me feedback. Thank you so much.

Resources :

https://www.inmotionhosting.com/support/edu/cpanel/how-to-change-the-php-version-your-account-uses/

Enjoy Your Code !

Enver ŞANLI

Web Developer, Social Thinker and Farmer

--

--

Enver Şanlı
Enver Şanlı

No responses yet