PHP is a server-side programming language which can be used to create advanced websites that perform actions that are not possible with a plain HTML site. Some features, enabled by PHP, include the ability to send email messages through your website, display different content depending on the person visiting the site, and even perform arbitrary server-side computations like image processing and PDF document generation.
Like most other programming languages, new versions of the PHP language are released over time. These new versions often fix bugs and introduce new functionality that web developers can take advantage of. In this article, we will show you how to update the PHP version that is used on your hosting account.
Which PHP Version Should I Use?
Conventional wisdom holds that you should be using the latest available version of PHP, as it will offer the newest features and incorporate the highest number of bug fixes. There is just one other factor you should take into account – whether or not you are using a third-party Content Management System (CMS).
If you are not using a CMS and instead you have coded your own PHP website, you can safely try running the latest version of PHP. And if any errors occur, you can always downgrade back to your previous PHP version.
If, on the other hand, you are using a CMS such as WordPress, Joomla, or OpenCart, you should refrain from always running the latest version of PHP. The reason for this is that the CMS developers might not have had enough time to ensure full compatibility with the latest version of PHP. Instead, we suggest checking the CMS developer’s website for information on what is the optimal version of PHP to use with their CMS.
How Do I Update My PHP Version?
The actual process of changing your PHP version is very straightforward. Follow the steps below in order to update the PHP version that is used on your hosting account:
- Open the PHP Settings section of the Control Panel.
- In case you are using one of our premium hosting plans and you have made customizations to your PHP installation through your global php.ini file, you should back up the contents of the php.ini file. Not sure how to make a copy of your php.ini file contents? You can read our article on how to customize your PHP settings. If you have not made any modifications to your php.ini file, you can skip this step.
- You will notice a dropdown menu with different PHP versions, as shown in the screenshot below. Use this dropdown menu to select the version of PHP that you would like to use and then confirm your choice by clicking on the Switch button.