Which version of php should i use?

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

Starting in early March 2022, HostGator will upgrade the available PHP versions on our hosting servers to include PHP 8.0. Please see Upgrading to PHP 8.0 for more information.

Please be aware that PHP versions older than 7.3 will no longer be supported as we work on updating accounts. If it is necessary for your website to use the older PHP versions, this can be done manually. Let us know via phone or Live Chat so we can assist you. However, 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 ↴
  • Additional References ↴

What version of PHP am I using?

With a variety of 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 version of PHP is being referenced by that directory.

Which version of php should i use?

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. In this video, we cover how to use the MultiPHP Manager plugin in cPanel.

 

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.

Note: Customers on a VPS or Dedicated server will only have one PHP version installed by default. To use alternate versions of PHP, please contact Support via phone or Live Chat 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 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.

Key


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

Hosting TypePHP 7.0.xPHP 7.1.xPHP 7.2.xPHP 7.3.xPHP 7.4.xPHP 8.0.x
Shared Hosting
Upon
Request

Upon
Request

Default

Configuration Plugin

Configuration Plugin

*Configuration Plugin
Cloud Sites
Upon
Request

Upon
Request

Upon
Request

Configuration Plugin

Default

*Configuration Plugin
Optimized WordPress
Upon
Request

Upon
Request

Upon
Request

Upon
Request

Default

*Default
Reseller Hosting
Upon
Request

Upon
Request

Upon
Request

Configuration Plugin

Default

*Configuration Plugin
KVM VPS (with cPanel)
Configuration Plugin

Configuration Plugin

Configuration Plugin

Default

Upon
Request

*Upon
Request
Linux Dedicated Servers
Configuration Plugin

Configuration Plugin

Configuration Plugin

Default

Upon
Request

*Upon
Request
 

*Note: Pending PHP 8.0 upgrade starting in early March 2022.

Windows Hosting

Hosting TypePHP 5.6.xPHP 7.0.xPHP 7.1.xPHP 7.2.xPHP 7.3.xPHP 7.4.xPHP 8.0.x
Windows Shared Hosting
Configuration Plugin

Default

Configuration Plugin

Configuration Plugin

Configuration Plugin

Configuration Plugin

Not Available
Windows Dedicated Servers
Default

Configuration Plugin

Configuration Plugin

Upon Request

Upon Request

Upon Request

Upon Request


Additional References

  • 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 Live Chat.

Is PHP 5 faster than 7?

PHP 7 is an improved version of PHP 5 that provides faster performance while using less storage. PHP5 coding is much simpler than traditional coding, and PHP 7 provides developers with a simple coding system. The upgraded PHP7 engine is regarded as a next-generation design.

What is the most stable PHP version?

The latest PHP version is 8. x, which features major performance improvements in addition to major features that bring support for stability and predictability in the code.

What is the difference between PHP 7.4 and 8?

What is the difference between PHP 7.4 and 8 ? A: One of the many examples is, WordPress on PHP 8.0 can handle 18.4% more requests per second than PHP 7.4. Moreover, Laravel on PHP 8.0 can run 8.5% more requests per second than PHP 7.3.

Is PHP 7.4 outdated?

Releases during this period are made on an as-needed basis, and once that year is up, the version is no longer supported and is considered End of Life (EOL). PHP 7.4 is reaching EOL and will no longer receive security updates as of November 28, 2022.