If you want to keep your web site running smoothly and securely, it is a good idea to keep your PHP version as up-to-date as possible. There are many useful reasons why you should update the PHP version on your sites, such as keeping up with the latest bug fixes and security issues and being able to get the last updates of your favourite themes and plug-ins. Updating PHP is not always a smooth experience. There are a few things to keep in mind before upgrading the version of PHP on your site or server.
Not all themes and plug-ins may support the latest versions of PHP. You should check the documentation for the plug-ins and themes you are using to make sure they support the PHP version you are upgrading to. If you are not sure whether a particular theme or plugin will work with newer versions of PHP, please contact the author of the plugin or theme.
WARNING! Before updating your PHP version, it is always a good idea to make a backup of your website!
Shared hosting
If you are on a shared hosting platform, most likely, your host has a few selected versions of PHP to choose from. These can often be changed from the customised panel provided by your host. For example, in the case of a blog created with Wordpress.com, it is the platform itself that handles all the administration of the domain, and the procedure for updating PHP is very simple. Just go to the 'Configure Hosting' sub-menu from the settings and scroll down to change the PHP version of your site.
VPS (Virtual Private Server):
In the case of a VPS, the procedure to follow is less automated as we are administering a space that is ours alone and not shared, the steps usually include accessing your Web Host Manager interface. Make sure you log in using the https protocol. From here you should have access to the EasyApache component that allows you, via a wizard, to set up your hosting. If this tool is not available or you are not sure which commands to execute, please refer to your host and its documentation.