Last updated 5th May 2020
There are many different types of website published online. With an OVHcloud Web Hosting plan, you can host whatever kind of website you want, provided it is compatible with our infrastructures’ configuration. As a result, you may find that you want to modify the PHP version used by your Web Hosting plan.
Find out how to change the PHP version on an OVHcloud Web Hosting plan.
- a compatible OVHcloud Web Hosting plan (excluding Cloud Web)
- the ability to manage the Web Hosting plan from the OVHcloud Control Panel, or access to the information you need to connect to the storage space
There are now several versions of PHP programming language. As usual, version developments include different patches, and also add or remove features. OVHcloud offers the very latest PHP versions, a list of which can be found here: https://www.ovh.com/ca/en/web-hosting/php.xml.
Because some features cannot be maintained in newer versions, please ensure that the new PHP version you want to use is compatible with your website before you start making any changes.
Step 1: Ensure that your website is compatible.
Although OVHcloud manages setup for the latest PHP versions on its servers, as a webmaster, you are responsible for ensuring that your website is up-to-date and compatible with the latest PHP versions. There are two ways of doing this, depending on the type of website you are using.
If you are using a turn-key website, based on a CMS (e.g. WordPress or Joomla!):
- Check the official documentation released by your CMS's publisher.
- Note down the information concerning essential technical requirements for your CMS to work, as well as the changes you need to make in order to update your CMS.
- If necessary, update your CMS and check that the new version is compatible with your OVHcloud Web Hosting plan.
If you are using a website based on a custom solution:
- Get in touch with the webmaster who built the website.
- Check the official PHP documentation, which provides more information on the version migrations. The official documentation is available here: http://php.net/manual/en/appendices.php.
- If necessary, update your website’s code and check that it remains compatible with your OVHcloud Web Hosting plan.
If you need to see which PHP version is currently used by your OVHcloud Web Hosting plan, there are two ways of doing so:
|Via the OVHcloud Control Panel||Log in to the OVHcloud Control Panel, click
|Via a script||Create a .php script, containing only the code
If you are unable to ensure that your website is compatible with the new PHP version, you can try to change the current version and undo your changes if necessary. Please note, however, we strongly advise against adopting this method. By doing this, you run the risk of your website experiencing some technical issues. It is also important to keep in mind that even if the website displays properly once you have changed the PHP version, specific features may be affected, and may no longer work properly.
Once you are ready to change the PHP version, please move to the next step.
Step 2: Change the PHP version on your Web Hosting plan.
There are several ways you can modify your Web Hosting plan’s PHP version:
Through a configuration wizard in the OVHcloud Control Panel. This solution is less technical, and you will need to be logged in to the OVHcloud Control Panel, where you can choose the new PHP version along with other settings. Please refer to the instructions set out in this guide if you would like to use this method: Modifying the configuration of a Web Hosting plan.
By manually modifying a file in your storage space. This solution is more technical, and you will need to be logged in to your storage space, so that you can modify the .ovhconfig file. Please refer to the instructions set out in this guide if you would like to use this method: Configuring the .ovhconfig file of your Web Hosting plan.
If you are more technically experienced, please note that you can no longer modify the PHP version via an .htaccess file on the latest OVHcloud Web Hosting plans. The command that changes the PHP version in .htaccess files cannot be used to switch to the latest PHP versions on our infrastructures. Instead, you will need to edit the .ovhconfig file, which you can do by following this guide: [Configuring the .ovhconfig file of your Web Hosting plan]../configuring-file-ovhconfig/).
Join our community of users on https://community.ovh.com/en/.
Did you find this guide useful?
Please feel free to give any suggestions in order to improve this documentation.
Whether your feedback is about images, content, or structure, please share it, so that we can improve it together.
Your support requests will not be processed via this form. To do this, please use the "Create a ticket" form.
Thank you. Your feedback has been received.