How To Choose Update Change hostgator PHP version

I want to show you How To Choose Update Change hostgator php version you are using on your site, and how to change update it through cPanel’s MultiPHP Manager.

Create and Edit A PHPinfo.PHP (Hostgator cpanel)

Easily Create and Edit A PHPinfo.PHP (Hostgator Cpanel)

Create A PHPinfo.PHP (Hostgator Cpanel)

file manager cPanel update change php version HostGator

create a phpinfo.php page. Now open Public HTML directory. We will scroll down until we find the file manager, we will click on that icon and it is going to take me to my cPanel’s home directory.

create phpinfo.php update change php version HostGator cPanel

If I am working inside of public HTML I need to scroll down and find that folder. We will double click here. This is where all the content from web site is stored, and I need to create a brand-new file.

What I am going to do is click the top left-hand corner where it shows a plus sign next to file. Click that, and now we just need to give this new file a name.

The standard naming convention for a phpinfo page is ‘phpinfo.php’, but you can really name this file anything that you want as long as it has the ‘.php’ extension at the end.

Once I have it typed in, we will click the ‘create new file’ button here, and now it has officially appeared inside of my file manager in the correct directory.

Edit A PHPinfo.PHP (Hostgator Cpanel)

It is essentially an empty file at this point, so now we need to put some content in it so I can view the version of PHP that I am using.

#Use the following code to show all the information about PHP.
	<?php
	phpinfo(); // This would be used to display all of the PHP information available for the installation.
	?> 

What we are going to do is take the content inside of the show all PHP information box, copy that to my clipboard, and then head back over to the file manager.

edit phpinfo.php update change php version HostGator cPanel

Now we need to edit this file to put some of that data inside of it, so right-click on the phpinfo page.

That is always going to give you an option to back up the original file. Since there is currently no content in here, we are not going to need to do that.

phpinfo.php Save Changes update change php version HostGator cPanel

just go ahead and click edit and we are inside of the blank file, paste that information code from the phpinfo, and then click ‘Save Changes‘.

how to choose update change my php version on hostgator

Let us say I want to update this to something newer like 7.2 or perhaps the newer 7.3. I am going to head back to my cPanel now, and what I want to do is go to the quick functions bar.

MultiPHP Manager update change php version HostGator cPanel

type in ‘multi’. It is going to bring me to MultiPHP Manager. As you can see this is also in the software section, so if you wanted to scroll down and find it you can.

I like that quick search function, so we will click on the MultiPHP Manager here, and this page is going to allow me to modify the version of PHP for any domain that I have on my server.

Let us scroll down just a little bit here, and I can see all the domains that I have. select the checkbox next to that domain.

Up here you will see that apply button has illuminated, and now we can go ahead and choose the exact version of PHP that I want to use.

how to choose update change my php version on HostGator

I am currently using 7.1. I want to go all the way up to 7.3, so choose that from the drop-down, and we will click apply. I got a nice successful message there at the top.

Let us head back to our phpinfo page and refresh this to see if the change is taking effect. There we have it, I am now on Version 7.3. It really is that easy to change the version of PHP that you are using.

HostGator change PHP version .htaccess

If you are on WordPress, or a different CMS that needs to be in the more updated version, it is easy to get that done.

how to choose update change my php version htaccess on HostGator

If you are using one of the older versions of PHP selector, there may be one of the older PHP Handler (what tells the website which PHP version to use) that is inside of your .htaccess file.

I will show you how to track that down just in case you are receiving any error messages on your site. Let us get back to our cPanel’s file manager, and I will look at this .htaccess file.

right-click that just a view, and down here at the bottom you will see the new PHP Handler.

If you have an earlier version of PHP, or an earlier PHP Handler it will usually be above this, and if you are noticing any issues on your site.

you can use the comments to comment out that on the actual .htaccess file, or you could just simply remove it by editing that file.

As you can see now, we are officially on version 7.3. I have completely updated my PHP version, and it is just that simple.