Changing a Web Hosting plan’s PHP version

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.

Requirements

Instructions

Several versions of the 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.

Step 1: Ensure that your website is compatible

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):

  • Consult the official documentation created by the publisher of the CMS you are using.
  • Please note down the information on the technical requirements you need 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 OVHcloud hosting services.

Case 2: A website based on a custom solution:

  • Get in touch with the webmaster who created the website.
  • Use the official PHP documentation for more information on version migrations.
  • If necessary, update your website’s code and ensure that it remains compatible with OVHcloud hosting services.

If required, you can find out which PHP version is currently used by your hosting system in two ways:

  • In the OVHcloud Control Panel: Log in to the OVHcloud Control Panel, go to the 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.

phpversion

If a blue circle is displayed, wait a few minutes for the version to refresh.

  • Using a script: Create a .php script containing only the code <?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.

Step 2: Modify your Web Hosting plan’s PHP version

There are two ways to modify your Web Hosting plan’s PHP version:

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 apply 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

Go further

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/.


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.


These guides might also interest you...

OVHcloud Community

Access your community space. Ask questions, search for information, post content, and interact with other OVHcloud Community members.

Discuss with the OVHcloud community

In accordance with the 2006/112/CE Directive, modified on 01/01/2015, prices incl. VAT may vary according to the customer's country of residence
(by default, the prices displayed are inclusive of the UK VAT in force).