Worried about the slow performance or frequent security breaches of your website? It may be due to an outdated PHP version. Check out which version you are using and whether it is still being supported. Once you have checked for available updates, find out how to change PHP version in cPanel for your Bluehost account.

 

What is PHP?

PHP or Hypertext Preprocessor is a highly popular server-side programming language being used by a majority of websites. The language pertains to the WordPress ecosystem and has very good online documentation, which is what makes it highly popular among website developers. However, merely using PHP is not enough. What is required and recommended by experts is that you use the latest version of WordPress PHP for best results.

 

What Happens When You Use an Old PHP Version?

Just like any other software that you may be using, PHP is constantly being improved and updated. Each update of a PHP version is supported for a specific period after its release and during this time, all the bugs and other security issues associated with it are fixed regularly. The PHP version 5.6 and 7 had reached their end of life in December 2018, followed by PHP version 7.1, all support to which ended in December 2019. The latest to enter this list is the PHP version 7.2 which reached its end of life in November 2020. 

 

If you are using a PHP version that is not being supported, you are: 

  1. Exposing your website to security risks
  2. Remaining deprived of performance enhancements available with newer versions
  3. Hosting a website that is running slow

 

Why Should You Update PHP?

PHP is the backbone of your website and you should go for the updated version to ensure its optimum performance. A word of caution here: Before you decide to upgrade, check the compatibility of your site against new versions of PHP. Read on to know more about “how to update PHP version in WordPress” and the benefits that come with it.

 

Here are some benefits of updating PHP:

  • Security – The latest versions are always fully supported and checked for any kind of security issues. Moreover, they are launched to remove the shortcomings and flaws in the earlier versions. You can avoid security issues associated with DoS, code execution, memory corruption, directory traversal, bypass and overflow by using the latest supported versions.
  • Speed and Execution – Newer versions of PHP-7.2, 7.3, 7.4 and 8.0 have been designed to boost the performance of your WordPress website. These versions not only reduce the latency time but also boost the speed of loading and processing requests received in a second.
  • Support – By updating your PHP version you can be assured of all the support required to run your website smoothly. For the smooth operations of your plugins and themes, latest versions are required. Continuing to use an older PHP version may result in errors and hurt the performance of your website.
  • New Features – The addition of new features in the newer versions of PHP make it easier for developers to perform their task and support the websites. Do check out the new features in PHP versions 7.3 and above.

 

The WordPress site also recommends usage of PHP version 7.4 or greater. Although the site mentions that WordPress works with PHP 5.6.20, it warns that since this version has reached its official end of life, your site may be exposed to security vulnerabilities.

 

Things to Keep in Mind for Switching to New PHP versions

Bluehost hosting servers support PHP 7.0 and higher versions thereby offering good speed and memory usage besides reducing errors and quick bug fixing. However, before you decide to make the switch to the newer versions, you need to be aware of backward compatibility issues with scripts and the PHP config of your site.

The old PHP coding of your website may not be compatible with newer versions. You can avoid this by not skipping versions and updating regularly. Before you go ahead with the switchover to newer versions, check the compatibility of your site against newer versions. If your site has been built with WordPress, you can use the PHP Compatibility Checker plugin. Otherwise, you can check the PHP Manual for reviewing new and deprecated features of PHP

 

Steps to Upgrade or Change PHP Version

  1. Now that you have realized the benefits of upgrading the PHP version, you need to log into your Bluehost control panel.
  2. Under the hosting tab, click on cPanel, the web hosting control panel software for administration.
  3. Locate the software section
  4. Click on the MultiPHP Manager icon
  5. Select the PHP version that you wish to update to- 7.1, 7.2 and 7.3
  6. Click on save changes or apply to finish the update
  7. You may need to create a php.ini.file that is compatible with your selected version of PHP

 

What is PHP.ini.file?

Your server is configured with the standard settings for PHP which are used by your website as default. If you need to change any of the settings related to upload sizes, file timeouts, and resource limits, you will need to create or modify a php.ini.file. This file is the default configuration file for running applications that require PHP.

 

The following steps are required to generate a new php.ini.file-

  1. Login to your Bluehost control panel
  2. Go to the software section and click on MultiPHP INI Editor
  3. Go to the ‘selecting a location’ section and select the path
  4. Choose the Domain Name
  5. Click on Apply

Now that you are clear about how to change PHP version in cPanel, don’t waste time and start the process. Once you have upgraded the PHP version of your website and generated a new php.ini.file, see your website working at optimum levels.

Author

Write A Comment