Changing a Web Hosting plan’s PHP version
Find out how to change the PHP version on an OVHcloud Web Hosting plan
Find out how to change the PHP version on an OVHcloud Web Hosting plan
Last updated 19th September 2022
With your OVHcloud web hosting you can host whatever website you want, provided that it is compatible with our infrastructure configurations. In this regard, 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.
Several versions of PHP programming language exist. Version developments include various patches, as well as adding or removing features. OVHcloud offers the latest major versions of PHP, for which you can find a list here.
Since some features may not be maintained with newer versions, make sure, before you make any changes, that the new PHP version you want is compatible with your website.
Although OVHcloud manages the setup of the latest PHP versions on its servers, it is up to you as a webmaster to ensure that your website is always up to date and therefore compatible with the latest PHP versions. There are two ways of doing this, depending on which website you are using:
Case 1: A turn-key website, such as a Content Management System (CMS) (e.g. WordPress, Joomla!, PrestaShop, Drupal):
Case 2: A website based on a custom solution:
If required, you can find out which PHP version is currently used by your hosting system in two ways:
Web Cloud
section, click on Hosting plans
then select the Web Hosting plan concerned. In the General information
tab, locate the version number below Global PHP version.If a blue circle is present, wait a few minutes for the version to refresh.
<?php phpinfo(); ?>
. Upload it to your FTP storage space, then call it by accessing its full address/URL.If you are unable to ensure that your website is compatible with the new PHP version, you can try changing the current version by downgrading it. We strongly advise against this method because you run the risk of causing a technical issue on your website. Even if the website seems to work after the change, it may affect one of its specific features, causing errors.
Once you are ready to make the change, continue to step 2.
There are two ways to modify your Web Hosting plan’s PHP version:
Using the configuration assistant in your Control Panel: Once you have logged in to your OVHcloud Control Panel, you can choose the new PHP version you want from other settings. Please refer to the instructions set out in our guide “Modifying the configuration of a Web Hosting plan” to use this method.
By manually editing a file in your storage space: This solution is more technical. You need to log in to your FTP storage and edit the .ovhconfig file. Please refer to the instructions set out in our guide “Configuring the .ovhconfig file of your Web Hosting plan” to do this.
You can no longer modify the PHP version via a .htaccess file on the latest OVHcloud web hosting offers.
The command that changes the PHP version in the .htaccess file cannot be used to use the recent PHP versions on our infrastructures.
To do this, you will need to use the .ovhconfig
file as explained our guide “Configuring the .ovhconfig file of your Web Hosting plan”.
Some PHP versions only work with certain runtime environments. The following are the PHP versions available on OVHcloud web hosting plans and compatible runtime environments:
PHP versions | Compatible runtime environments |
---|---|
5.4, 5.5, 5.6 and 7.0 | Legacy, Stable |
7.1, 7.2 and 7.3 | Stable |
7.4, 8.0 and 8.1 (beta) | stable64 |
Modifying the configuration of a Web Hosting plan
Configuring the .ovhconfig file of your Web Hosting plan
Logging in to your Web Hosting plan’s storage space
For specialised services (SEO, development, etc.), contact OVHcloud partners.
If you would like assistance using and configuring your OVHcloud solutions, please refer to our support offers.
Join our community of users on https://community.ovh.com/en/.
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.
Access your community space. Ask questions, search for information, post content, and interact with other OVHcloud Community members.
Discuss with the OVHcloud community