Webhosting – PHP Configuration (Version)

  Web Hosting

In this article, you will learn:

Available PHP Versions

You can currently set the following PHP versions on the Webhosting service:

  • PHP 5.4 – 5.6 (deprecated, hazardous)
  • PHP 7.0 – 7.4 (deprecated)
  • PHP 8.0 – 8.2 (current)

You choose the version either during Webhosting order, or later you can change it according to the instructions in the PHP Configuration chapter.

PHP Configuration

Changes to the PHP configuration will take effect within 30 minutes of saving.

Before changing the configuration, make sure that your web application (system, plugins, templates) supports the new settings.

Follow these steps to enter the PHP configuration interface:

  1. Log into the customer administration panel.
  2. In the navigation bar, select Web & Email Hosting Webhosting or WMS.
  3. Choose the Webhosting to configure PHP on.
  4. In the left menu, click PHP Configuration.

In this interface, you can:

  • Set a different PHP Version.
  • Choose default or custom settings for selected php.ini parameters. For custom settings, enter new values.

Confirm the new settings with the Edit button at the top of the page. After saving, wait 30 minutes for the changes to be applied to the system.

WEDOS Sample PHP version change
Sample PHP version change

Available PHP Parameters

Some PHP parameters are determined by the Webhosting service plan. In the configuration interface, you can set the following parameters (the default value is shown in parentheses):

  • allow_url_fopen (On)
  • allow_url_include (Off)
  • auto_append_file (Off)
  • auto_prepend_file (Off)
  • display_errors (On)
  • html_errors (On)
  • ignore_user_abort (Off)
  • implicit_flush (Off)
  • log_errors (Off)
  • max_execution_time (90), available range 5 – 300 s
  • max_file_uploads (20), available range 0 – 50
  • max_input_vars (10000), available range 0 – 100000
  • output_buffering (Off)
  • session.auto_start (Off)
  • session.cookie_httponly (Off)
  • session.cookie_secure (Off)
  • session.use_cookies (On)
  • session.use_only_cookies (On)

Webhosting Plan Parameters

These parameters are given by the Webhosting plan (values ​​in parentheses for LowCost | NoLimit | NoLimit Extra):

  • Number of PHP threads (7 | 25 | 30)
  • memory_limit (256 MB | 512 MB | 1024 MB)
  • upload_max_filesize (128 MB | 256 MB | 512 MB)
  • post_max_size (128 MB | 256 MB | 512 MB)

You can find a detailed Webhosting plan comparison at this link. You can find instructions for changing the plan in the article Webhosting – Change Plan.

WMS Parameters

For WMS, you can also change the following parameters:

Basic Configuration (default)

  • PHP Priority (0) – lower value = higher priority, priority requests are processed by the server first
  • Number of CGI Slots (7) – maximální počet souběžně spuštěných PHP procesů
  • Max. Number of Connections (null) – the basic number of connections that the webhosting can establish
  • Process Acme-Challenge URLs (On)
  • HTTP proxy Cache (On) – Webhosting proxy caching

php.ini Settings (default)

  • max_input_time (30)
  • max_input_vars (10000)
  • memory_limit (128)
  • opcache.enable (On)
  • post_max_size (32)
  • upload_max_filesize (32)

Common Issues

Common issues with changing PHP configuration include:

New PHP Settings Broke the Website

Issue: After changing the PHP version or parameter, the website stopped working.

Cause: The application or its part (template, plugin, etc.) is not compatible with the new version of PHP or parameter value.

Solution: Change the PHP version or parameter value to the previous one. Handle the compatibility issue in cooperation with the webmaster or the application support.

Different PHP Versions on Webhosting

Issue: I need a part of the application to run on a different PHP version.

Cause: Multiple domains/subdomains with applications that have different PHP requirements can run on one Webhosting. However, the administration panel settings apply to the entire service globally.

Solution: You can run a specific file with a different PHP version by adding the version number (without the decimal point) after the file extension. For example, the application.php74 file will launch the file with PHP version 7.4. If this solution is unacceptable, the only option is to migrate the problematic application to a separate Webhosting.

FAQ

Question: How do I change a parameter to be higher than the maximum allowed value?
Answer: Some parameters (typically max_execution_time) can be temporarily increased by customer support. Send a request through the form; enter the Webhosting name, the requested value and why you need that specific value.

Question: How do I change a parameter that is not listed in the administration panel?
Answer: If it is not a parameter that depends on the Webhosting plan, you cannot change it on the shared Webhosting. The solution can be a WMS service, which has extended PHP parameter options, or a custom VPS server.

Question: I’ve changed the PHP version and nothing’s happening, what’s wrong?
Answer: Changing the PHP version can take up to 30 minutes. Please wait. If the problem persists, contact customer support.

Question: How do I enable Memcache or Xcache?
Answer: Webhosting and WMS use OPcache, not Memcache or Xcache. Due to the nature of these services, these extensions cannot be added. Custom web server configuration is only possible on VPS services.

Děkujeme za zpětnou vazbu!