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. In this video we cover how to use the MultiPHP Manager plugin in cPanel.
For more information on this plugin, and the old PHP Selector plugin, please see the following link for more information.
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 the 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.
✔ Default | This is the default version on newly provisioned servers. Some legacy servers may use an older version as default. |
✔ Configuration Plugin | You can use this version with a small change using our PHP configuration plugin. |
✻ Upon Request | You can request this version of PHP by contacting us via phone or Live Chat |
✘ Not Available | This PHP version is not available for this hosting plan. |
❖ Not Officially Supported | Not officially supported, but you can request it. Use at your own risk. |
Linux
Hosting Type | PHP 7.0.x | PHP 7.1.x | PHP 7.2.x | PHP 7.3.x | PHP 7.4.x | |
---|---|---|---|---|---|---|
Shared Hosting | ✔ Configuration Plugin | ✔ Configuration Plugin | ✔ Configuration Plugin | ✔ Configuration Plugin | ✔ Configuration Plugin | |
Cloud Sites | ✔ Configuration Plugin | ✔ Configuration Plugin | ✔ Configuration Plugin | ✔ Configuration Plugin | ✔ Configuration Plugin | |
Optimized WordPress | ✻ Upon Request | ✻ Upon Request | ✔ Default | ✻ Upon Request | ✻ Upon Request | |
Reseller Hosting | ✔ Configuration Plugin | ✔ Configuration Plugin | ✔ Configuration Plugin | ✔ Configuration Plugin | ✔ Configuration Plugin | |
VPS Hosting with cPanel | ✔ Configuration Plugin | ✔ Configuration Plugin | ✔ Configuration Plugin | ✔ Default | ✻ 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 | ✔ Configuration Plugin | ✔ Configuration Plugin | ✔ Default | ✻ Upon Request | ✻ Upon Request |
Windows Hosting
Hosting Type | PHP 7.0.x | PHP 7.1.x | PHP 7.2.x |
---|---|---|---|
Windows Shared Hosting | ✔ Default | ✘ Not Available | ✘ Not Available |
Windows Dedicated Servers | ✔ Default | ✻ Upon Request | ✻ Upon Request |