How to change the PHP version in the LWS Panel Web Terminal

Procédure

What is the SSH Terminal?

The Terminal tool in the LWS Panel allows you to have an SSH shell directly on your web hosting, via your web browser while being logged into your customer area, without needing an SSH client like Putty.

It is a practical tool if you need to run commands on your hosting.

The SSH Terminal is available from the LWS Starter to Performance plan, by going to "SSH Terminal" found in the "Software" section. Thanks to this Terminal, it is possible to modify and perform certain installations such as Composer.

By default, the Terminal's PHP version is the latest version available. You can view the version by going there and typing the following command:

Code
php -v

However, if needed, it is possible to change the PHP version to one of those available on the Terminal, from PHP 5.6 to PHP 8.1.

How to change the PHP version through the LWS Panel Web Terminal?

Log in to your LWS customer area and click on "Manage" located behind the relevant LWS plan

How to change the PHP version in the LWS Panel Web Terminal

Click on the "SSH Terminal" tool found in the "Software" section.

How to change the PHP version in the LWS Panel Web Terminal

In the SSH Terminal, you will need to create a new profile using the "touch" command.

Code
touch ~/.profil 

You can replace "profil" with the name of your choice. Please note that for each command, it will be necessary to replace the name "profil" with the one you have defined.

How to change the PHP version in the LWS Panel Web Terminal

Edit the "profil" file using the following command:

Code
nano ~/.profil

How to change the PHP version in the LWS Panel Web Terminal

Add the following code to the "./profil" file:

Code
export PATH=/opt/php7.0/bin:$PATH

When adding the code line, remember to change php7.0 to the desired PHP version. The available versions are as follows:

  • php5.6
  • php7.0
  • php7.1
  • php7.2
  • php7.3
  • php7.4
  • php8.0
  • php8.1
  • php8.2
  • php8.3
  • php8.4
  • php8.5

How to change the PHP version in the LWS Panel Web Terminal

Press [CTRL] + X simultaneously, then "Y" and the "Enter" key to save the file.

How to change the PHP version in the LWS Panel Web Terminal

Finally, load the .profil file using the following command:

Code
source ~/.profil

How to change the PHP version in the LWS Panel Web Terminal

You can check the PHP version used by the SSH Terminal using the following command:

Code
php -v

How to change the PHP version in the LWS Panel Web Terminal

help.lws.net/a/1598
Was this article helpful?

Yes

No

Read 21 787 times

Thank you! Feel free to ask questions about our documentation if you would like more information, and help us improve it.

Similar articles

Questions about the article 3

Ask a question
LChris57
18 Nov 2022
Bonjour Mon logiciel réclame une version minimale PHP de 7.1.0, même si, pour l'instant je peux tout de même exporter mon site avec une version PHP antérieure. Comment puis-je procéder pour passer de la version actuelle de PHP à cette version 7.1.0.
fabrice-LWS Official answer
19 Nov 2022
Bonjour, vous avez la possibilité de modifier la version PHP en suivant la procédure suivante: https://aide.lws.fr/a/84
Was this answer helpful?
asrarquoran
5 Jan 2023
pourquoi je ne peux pas accéder à mon site wordpress [domaine masqué]
Benjamin-LWS Official answer
6 Jan 2023

Bonjour,

Si vous souhaitez avoir une aide sur votre problème Wordpress, je vous invite à ouvrir un ticket sur notre support technique.

Voici une documentation portant sur l'ouverture de ticket via votre espace client : https://aide.lws.fr/a/268

Was this answer helpful?
nicolas
11 May 2025
ne marche absolument pas sur offre starter ! comme beaucoup d'autre chose très déçus de cette hébergeur !!!!
Jordan-LWS Official answer
14 May 2025

Bonjour,

Je vous invite à contacter directement notre support technique afin que nous puissions examiner plus en détail le problème auquel vous êtes confronté.

Il est possible que la version de PHP que vous avez sélectionnée ne soit pas installée sur votre espace d’hébergement, ce qui pourrait expliquer le dysfonctionnement.

N’hésitez pas à joindre une capture d’écran ou à préciser les étapes menant à l’erreur afin de faciliter l’analyse.

Je vous remercie pour votre attention et reste à votre disposition pour toute autre question ou complément d'information.

Cordialement, L'équipe LWS 

Was this answer helpful?

A question about this article?

Ask the LWS team and the community. Answers are published after moderation.

Ask the LWS team and its community a question

GDPR: Controller: LWS-Ligne Web Services. Purpose: moderation and public publication of your question, possible notification of an answer. Legal basis: consent (Art. 6(1)(a) GDPR). Email retention: 90 days after notification, 12 months maximum without an answer. To exercise your rights, see the GDPR section of our Terms and Conditions.