What Version of PHP Are You Using?

The default version of PHP on your server depends on your hosting type. Please see the chart below for a breakdown of versions and availability by hosting type. The following information is covered in this article:

Please note: Secondary installs of PHP — any installation of PHP that is outside what is managed via cPanel — are free.

What Version of PHP am I Using?

With a variety of available PHP versions it can be difficult to identify which version your site is taking advantage of. This can be even more challenging to determine given that PHP versions are defined in the .htaccess file, meaning that subfolders can inherit the versions their parent directories are using.

The easiest way to be certain what version of PHP a folder is using is to create a phpinfo.php file in that directory and navigate to it. The top of the phpinfo page will tell you what version of PHP is being referenced by that directory.

The following article will provide instructions for how to create and visit a phpinfo.php file:

How Do I Change My PHP Version?

HostGator provides a PHP Configuration plugin on our Shared and Reseller server cPanels that allows setting the PHP version for specific directories and domains. Please see the following link for information on using this plugin:

Note: Customers on a VPS or Dedicated server will only have one version of PHP installed by default. To use alternate versions of PHP, please contact us to Support with your request.

What Versions of PHP are Available?

We highly recommend using the most up-to-date version available that is compatible with your scripts. Many of our servers have installations of legacy PHP versions which will not be guaranteed on current or future servers. The chart below shows the versions of PHP installed on newly provisioned servers.

All shared servers are updated with the versions of PHP listed below, even legacy servers, though a legacy version of PHP may be default. A VPS or Dedicated server will have the version of PHP which was default at the time of provisioning, and must request an upgrade as a PHP version change can cause errors and we will not do this automatically.

PHP versions 5.4 and earlier, available on many legacy servers, are deprecated software and no longer receive security updates from the PHP development team. As such, we recommend that you prepare your scripts for PHP 5.6 or higher.

Key:

Yes
Default
This is the default version on newly provisioned servers. Some legacy servers may use an older version as default. Yes
Configuration Plugin
You can use this version with a small change using our PHP configuration plugin.
Ticket Required
Upon
Request
You can request this version of PHP by creating a ticket to Support. No
Not Available
This PHP version is not available for this hosting plan.
Ticket Required
Not Officially
Supported
Not officially supported, but you can request it.  Use at your own risk.    

Linux

Hosting TypePHP 5.5.xPHP 5.6.xPHP 7.0.x
Shared Hosting
(Including Cloud Sites)
Yes
Default
Yes
Configuration Plugin
Yes
Configuration Plugin
Optimized WordPress No
Not Available
Yes
Default
Yes
Configuration Plugin
Reseller Hosting Yes
Configuration Plugin
Yes
Configuration Plugin
Yes
Configuration Plugin
VPS Hosting with cPanel Ticket Required
Upon
Request
Yes
Default
Ticket Required
Upon
Request
VPS with VZ Only Since this is a bare bones installation,
PHP is not installed by default,
but you can install any version you like.
Linux Dedicated Servers Ticket Required
Upon
Request
Yes
Default
Ticket Required
Upon
Request

 

Windows Hosting

Hosting TypePHP 5.4.xPHP 5.5xPHP 5.6.xPHP 7.0.x
Windows Shared Hosting Yes
Select in Plesk
No
Not Available
No
Not Available
No
Not Available
Windows Dedicated Servers Yes
 Select in Plesk
Yes
 Select in Plesk
Yes
 Select in Plesk
Ticket Required
Upon Request