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?
11. First, you must log in to your LWS account and access the shared hosting for which you want to modify the PHP settings.
22. Then click on the "PHP Configuration" icon available in the "Database & PHP" section:

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.

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.

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.

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.

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?
11. You can check the PHP version running in a folder by creating a phpinfo.php file in that folder with the following content:
You can use the File Manager available on your hosting to create and edit the file.
22. 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 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.