How do I configure PHP on my hosting?

Procédure

What is PHP?

PHP is a programming language that integrates into HTML pages.

It makes it possible to automate repetitive tasks, notably thanks to communication with a database (the most common use of PHP).

The PHP programming language is essential to the proper functioning of CMSs such as Wordpress, Joomla, Prestashop, etc., as well as any email form.

This article is intended only for customers who have chosen shared Linux web hosting.

If you have a Virtual Private Server (VPS), find out how to modify php.ini

How do I access my hosting's PHP settings?

1. First, you must log in to your LWS account and access the shared hosting for which you want to modify the PHP settings.

2. Then click on the "PHP Configuration" icon available in the "Database & PHP" section:

How do I configure PHP on my hosting?

How do I install a PHP version and select the hosting's default PHP version?

PHP, which stands for "PHP: Hypertext Preprocessor", is a widely used programming language for web development. A PHP version refers to a specific iteration of this language, with its own features, improvements, and bug fixes.

Choosing the right PHP version for your website is crucial for several reasons. First, each new version brings improvements in terms of performance and security. Using an outdated version can expose the site to security risks and reduce page load speed. Second, recent versions offer new features and better compatibility with modern web technologies, making it possible to build more sophisticated and functional websites. Finally, keeping your PHP version up to date ensures better compatibility with plugins and themes, which are essential for content management systems like WordPress.

However, some sites or applications may not be fully operational with the latest PHP version; in that case, using an older version may be the solution. If you have several applications on your hosting, each one may need a different PHP version.

In the first tab displayed, "PHP installation and selection", you can determine which PHP versions you want to use with the different applications on your hosting.

How do I configure PHP on my hosting?

Simply check or uncheck the box corresponding to the PHP version so that it is installed or uninstalled after clicking the "Save" button.

You can activate all PHP versions, but this may slow down your hosting and your websites. We recommend activating only the necessary versions. At a minimum, one version must be checked and installed on the hosting.

You also have the option to specify which PHP version will be used by default on your hosting. This setting is particularly useful if you need to use several PHP versions.

How do I configure PHP on my hosting?

Select the PHP version and indicate in the selector whether you want to apply this version only to your site accessible from the main domain name or to all sites on the hosting. Then click "Save" for the change to take effect.

How do I configure a different version for the sites on my hosting?

From the "PHP configuration by site" tab, you can specify a different PHP version for all the sites on your hosting.

How do I configure PHP on my hosting?

This page lists all additional domains added in multi-domain to your hosting, as well as all created subdomains.

You can then choose the PHP version to apply to each domain or subdomain in the list by selecting the version in the selector.

Then click the "Save" button at the bottom of the page for the changes to be applied.

For a PHP version to be available in the selector, it must first be installed (checked) in the "PHP installation and selection" tab

How do I modify the PHP settings of my hosting?

Various PHP parameter settings are available in the "General PHP configuration" tab

The PHP settings configured in this tab apply to your entire hosting, regardless of the PHP version used.

The values that can be configured for certain settings (memory_limit, max execution-time, etc.) vary depending on the hosting plan chosen.

How do I configure PHP on my hosting?

The available settings are as follows:

  • Installation of ATOS/PAYBOX binaries if your site uses a payment module requiring these binaries
  • allow_url_fopen which allows access to files via a URL and allow_url_include which allows remote files to be included in your website code.
  • Display_errors which displays PHP-generated errors on your site (ideal when the site is under development or deployment)
  • error_reporting allows you to specify different levels of PHP error reporting in the PHP logs of your hosting
  • Memory_Limit which limits the memory allocated to PHP scripts (maximum values depend on the plan)
  • Max_execution_time which limits the maximum execution time of a PHP script (maximum values depend on the plan)
  • Max_upload_size which limits the maximum size of files that can be uploaded (depends on the selected Memory_limit value)
  • Post_max_size which limits the size of files that can be submitted via the POST method (depends on the selected Memory_limit value)
  • Max_file_uploads which limits the number of files that can be uploaded simultaneously
  • OPcache which allows compiled PHP code to be cached to improve performance
  • TimeZone which allows you to determine the time zone on which your website will be based.

How do I check the PHP version actually used by my website?

1. You can check the PHP version running in a folder by creating a phpinfo.php file in that folder with the following content:

Code

You can use the File Manager available on your hosting to create and edit the file.

2. Then visit the following page through your web browser: http://domaine.com/dossier/phpinfo.php (replace "domaine.com" with your domain name and "dossier" with the folder where you placed your php file)

The following page should appear; it indicates the PHP version used by this folder and the various PHP settings and installed libraries.

How do I configure PHP on my hosting?  

How can I find out the PHP quotas and features of my web hosting plan? 

Check this complete help article that details all the features of our web hosting plans (LWS Panel): Help on the quotas and features of web hosting plans (LWS Panel).

Conclusion

You are now able to configure PHP on your shared hosting with LWS. PHP configuration allows you to change the PHP version used for your hosting. You can also modify some PHP directives.

Do not hesitate to contact our technical support via a support ticket with any questions.

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

Yes

No

Read 76 865 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
Diouz
12 Sept 2023
Je veux développer une application Web avec php sans utiliser les framework. Est il possible dans vos formules d'hébergement ? Avez-vous des outils que vous mettez en place au développeur dans ce cas de figure ?
Benjamin-LWS Official answer
15 Sept 2023

Bonjour,

Merci de votre retour.

Bien sûr, cela est possible, sur toutes nos formules d'hébergement à part la formule domaine.

Il n'y pas forcément d'outils mis en place pour les développeurs, mais vous pouvez éditer des fichiers depuis le gestionnaire de fichiers du panel.

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

Nous vous invitons à contacter notre service support à travers votre espace client, afin de vous apporter une aide si vous rencontrez des difficultés quelconque. (Contacter le support LWS)

Cordialement, L'équipe LWS 

Was this answer helpful?
Basil
1 Feb 2024
Bonjour, j'utilise prestashop et dans sa version de base il a besoin de la fonction proc_open pour l'envoi de mail avec swiftmailer. Cependant j'ai vu que cette fonction était désactivée dans la configuration PHP de LWS. Quelle est l'alternative svp?
Jordan-LWS Official answer
6 Feb 2024

Bonjour,

Je vous remercie pour votre message.

Je suis désolé de l'inconfort que vous rencontrez avec la fonction désactivée

Malheureusement, nous avons dû restreindre cette fonction PHP pour des raisons de sécurité et cela est indiqué dans nos CGV, des alternatives existent effectivement, par exemple PHP Mailer qui peut remplacer Swiftmailer, si malheureusement, vous souhaitez utiliser Swiftmailer à tout prix, il ne sera pas possible de l'utiliser sur nos services étant donné que l'accès à cette fonction est restreinte. 

Je vous remercie pour votre attention et reste à votre disposition pour toute autre question ou complément d'information. Vous pouvez nous contacter directement depuis votre espace client si vous le souhaitez afin de faciliter les échanges et trouver des solutions à vos problèmes.

Cordialement, L'équipe LWS.

 

Was this answer helpful?
LWS-412818 LWS team
25 Jul 2025
je veux installer des extension sur mon domaine notamment php-ldap ! Comment le faire avec une formule started
Jordan-LWS Official answer
25 Jul 2025

Bonjour,

Merci pour votre message.

Il n’est malheureusement pas possible d’installer des extensions PHP personnalisées, comme php-ldap, sur une formule mutualisée de type Starter. Ce type d’installation requiert un accès root au serveur, ce qui n’est pas permis sur une offre mutualisée pour des raisons de sécurité et de stabilité.

Pour pouvoir installer ce type d’extension, il est nécessaire d’opter pour une solution plus flexible, telle qu’un VPS (serveur privé virtuel), qui vous donnera un contrôle total sur l’environnement serveur, y compris la gestion des modules PHP.

N’hésitez pas à revenir vers nous si vous souhaitez des informations sur nos offres VPS ou un accompagnement pour migrer votre hébergement.

Cordialement, L'équipe LWS

Was this answer helpful?
Jordan-LWS Official answer
25 Jul 2025

Bonjour,

Merci pour votre message.

Il n’est malheureusement pas possible d’installer des extensions PHP personnalisées, comme php-ldap, sur une formule mutualisée de type Starter. Ce type d’installation requiert un accès root au serveur, ce qui n’est pas permis sur une offre mutualisée pour des raisons de sécurité et de stabilité.

Pour pouvoir installer ce type d’extension, il est nécessaire d’opter pour une solution plus flexible, telle qu’un VPS (serveur privé virtuel), qui vous donnera un contrôle total sur l’environnement serveur, y compris la gestion des modules PHP.

N’hésitez pas à revenir vers nous si vous souhaitez des informations sur nos offres VPS ou un accompagnement pour migrer votre hébergement.

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.