Shared Hosting: Migrating from PHP 5.3 to PHP 5.6

Why are we removing PHP 5.3? Why not allow legacy PHP versions?

Unfortunately, the developers of PHP have discontinued their support for older versions of PHP, and legacy PHP code is a prime target for malicious parties attempting to gain unauthorized access or deface your website. Versions of PHP which are marked as "unsupported" no longer receive security patches, and may also contain bugs which are fixed in subsequent major releases. It is in your best interest to pre-empt these problems by remaining up-to-date.

As a courtesy to our clients, we have offered extended support for EOL PHP for sometime. Unfortunately, cPanel will be completely discontinuing support for End Of Life (EOL) PHP versions in the very near future.

To this effect, we are removing support for PHP 5.3 shortly and will eventually discontinue support for the 5.4 and 5.5 branches of PHP (both of which are also EOL) in order to ensure that our server environments receive the latest in security features and remain supported for as long as possible.

What does this mean for you as a client?

For Shared Business accounts, this means that you will need to check your site(s) and any PHP scripts on your account for any outdated code references to the old PHP versions that may have been deprecated in the newer versions of PHP. You can view what code functions were deprecated with each PHP version upgrade under the "What has changed" section below.

If you are using a CMS, such as Wordpress/Joomla/Drupal or any other actively maintained PHP script that you didn't write, you will need to make sure your main installation and any Themes and Plugins are currently up to date and are still receiving support by their developers. Any theme or plugin that is no longer supported by the developers may mean that it has not been updated to use new PHP versions or functions and could be susceptible to vulnerabilities in their code due to this. If the plugin and/or theme is not updated to use the newer version, this could render your site offline or receive an error message.

For Reseller accounts, you will need to complete all of the above as well for your account, but you will also need to contact your direct clients so they are aware about the coming changes in PHP versions on the server as well, so they can ensure their site(s) code and scripts are ready for the newer supported versions of PHP.

How do you check to see if any part of your sites are using PHP 5.3?

In order to see your website's current PHP configuration, you can create a phpinfo page which will detail the version you are currently using, the path to the specific php.ini file that is being loaded, and the specific variables within the php.ini file.

Here is how you can create a phpinfo page using cPanel's File Manager:

Step 1:

Log in to your cPanel account and locate "File Manager":

Step 2:

Navigate to the document root for the website in question. Generally this will be "/home/USER/public_html" for the primary domain on a cPanel account.

Note: If this is for an addon domain or a subdomain, you can find the document root in cPanel under "Addon Domains" or "Subdomains."


Step 3:

Add a new file called "phpinfo.php".


Step 4:

Edit the new File and place this information in the file:





Step 5:

Click "Save Changes" so that the content is saved.

Step 6:

Go to "domain.tld/phpinfo.php" and you should see the current PHP version you are using at the top of the page, as well as the Loaded Configuration File. This is the specific php.ini file that the domain is using.

Note: Please be aware that we do not recommend leaving the phpinfo page available as it could potentially present a security risk. Once you have finished checking your configuration, we would highly recommend removing this file (and you can do that in cPanel's File Manager or via FTP).

If you are a coder, what has changed between PHP 5.3 and 5.6 that you need to be aware of?

You can find any and all changes between PHP versions on PHP Development Team's website. Specifically, here are the most relevant changes between each version:

Migrating between PHP 5.3 and PHP 5.4:

Migrating between PHP 5.4 and PHP 5.5:

Migrating between PHP 5.5 and PHP 5.6:

The most relevant pages with information will be "What has changed in PHP 5.x.x" and "Backward Incompatible Changes". The majority of changes you should experience are between PHP 5.3 and 5.4. A number of functions were removed between these versions as outlined in "Backward Incompatible Changes".

We would recommend before you upgrade any part of your site, that you first take a backup of the site so that if you do encounter issues that you are not able to resolve, restore from the backup to ensure that the site returns to it's previously functional format.

How do you switch to PHP 5.6?

Updating a cPanel account to use a newer PHP versions like PHP 5.6 is a simple process that can be completed through your cPanel File Manager, via FTP, or through an SSH connection. We have created the following resource article to help walk you through this process:

Are there plans to offer PHP 7 or 7.1?

Absolutely, but before we can move to the system supporting PHP 7 and 7.1, we need to retire PHP 5.3 because we cannot provide support for PHP 5.3 and PHP 7+ concurrently.