How to Update, Change HostGator PHP version .htaccess & Create phpinfo

I want to show you How to Update, Change HostGator PHP version .htaccess & Create and Edit HostGator phpinfo. It through cPanel MultiPHP Manager.

Create and Edit HostGator phpinfo

Step 1: Create a phpinfo.php page now open public_html Directory. scroll down until find the file manager click on that icon and it is going to take to cPanel Home Directory.

Step 2: public_html need to scroll down and find that folder and double click. This is where all the content from web site is stored and create a brand-new file.

Create and Edit HostGator phpinfo - create new file

Step 3: Next Click the top left-hand corner where it shows a plus sign next to file Click that and now 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 typed in will ‘create new file’ Click the button.

Step 4: It is essentially an empty file at this point so now to put some content in it. PHP information box below copy that to and then head back over to the file manager.

#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.
	?> 

Step 5: 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.

phpinfo.php Save Changes update change php version HostGator cPanel

Step 6: Since there is currently no content in here we are not going to need to do that. 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‘.

Update HostGator PHP Version

Update HostGator PHP Version - quick functions bar

Step 1: Update HostGator PHP Version go to the quick functions bar type in ‘multi’ It is going to bring you to MultiPHP Manager.

Step 2: So, if you wanted to scroll down and find so you will click on the MultiPHP Manager and this page is going to allow you to modify the version of PHP for any domain that.

Step 3: Let us scroll down just a little bit here and you can see all the domains that you have select the checkbox next to that domain.

Update HostGator PHP Version - apply button

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

Step 5: Go back to you phpinfo page and refresh.

HostGator Change PHP version .htaccess

HostGator Change PHP version .htaccess
  1. 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.
  2. You are receiving any error messages on your site get back to cPanel file manager and you will see at .htaccess file. right-click that just a view and down here at the bottom you will see the new PHP Handler.
  3. 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.
  4. 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.