跳到主要内容

What Version of PHP Are You Using?

  • Overview
  • Available PHP Versions
  • How to Update PHP
  • Fix MultiPHP Error
  • php.ini
  • Limits
  • View Settings

PHP is a widely used scripting language that powers millions of websites and web applications globally. It excels in server-side development, enabling dynamic content generation, seamless database interaction, and integration with HTML. The minimum PHP version on our Shared hosting servers is currently at 8.1. We highly recommend that you upgrade all your website installations and applications to be compatible with the newest PHP version. This article discusses the following topics.

  • What version of PHP am I using? ⤵
  • How do I change my PHP version? ⤵
  • What versions of PHP are available? ⤵
  • Linux Hosting ⤵
  • Windows Hosting ⤵
  • Related Articles ⤵

What version of PHP am I using?

With various available PHP versions, it can be challenging to identify which version your site is utilizing. 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 PHP version is referenced by that directory. PHP version page Want to know your website's current PHP version? Learn how to create a phpinfo.php file by visiting this article, How to Create 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 refer to this article to learn more about MultiPHP Manager and how to use it: How Do I Update the PHP Version on my Site? For the script used in creating the phpinfo.php file, you can visit this link for the complete set of instructions: How to Create a phpinfo.php File.


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 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 PHP versions listed below. Keys:

DefaultThis is the default version on newly provisioned servers. Some legacy servers may use an older version as default.
Configuration PluginYou can use this version with a small change using our PHP configuration plugin.
Upon
RequestYou can request this version of PHP by contacting us via phone or chat.

Linux Hosting

Hosting TypePHP 8.1.xPHP 8.2.x*PHP 8.3.x
Shared Hosting
Configuration Plugin
Default
Configuration Plugin
Reseller Hosting**
Configuration Plugin
Default
Configuration Plugin
VPS Hosting
Configuration Plugin
Default
Configuration Plugin
Linux Dedicated Hosting
Configuration Plugin
Default
Configuration Plugin
Notes :
* PHP upgraded to 8.2 as the default PHP version in June 2023.
**As we upgrade our Customer Portal to an optimized and easy-to-use design, Reseller hosting is no longer offered by HostGator for new signups. If you currently have the service, there will be no change to your product or service.

Windows Hosting

Hosting TypePHP 5.6.xPHP 7.0.xPHP 7.1.xPHP 7.2.xPHP 7.3.xPHP 7.4.xPHP 8.0.xPHP 8.1.xPHP 8.2.x
Windows Shared Hosting
Configuration
Plugin
Default
Configuration
Plugin
Configuration
Plugin
Configuration
Plugin
Default
Not
Available
Configuration
Plugin
Configuration
Plugin
Windows Dedicated Hosting**✻ **
Upon
Request**✻ **
Upon
Request**✻ **
Upon
Request**✻ **
Upon
Request**✻ **
Upon
Request**✻ **
Upon
Request
Configuration
Plugin
Configuration
Plugin
Configuration
Plugin
  • How to Update the PHP Version
  • How to Fix MySQL Extension Error
  • How to Create phpinfo.php for Primary and Addon Domains

Still having errors or need additional assistance? HostGator's Support is here to help. Just reach out to us via phone or chat so we can assist you!