---
title: "How to change PHP version on the web server"
canonical_url: "https://www.zone.lv/help/kb/how-to-change-php-version-in-the-web-server/"
post_type: "ht_kb"
published: "2023-10-06T11:02:03+00:00"
modified: "2024-09-05T12:29:47+00:00"
language: "en"
author: "Maris Ringvee"
taxonomies:
  ht_kb_category:
    - name: "PHP"
      url: "https://www.zone.lv/help/kb-categories/php-en/"
  ht_kb_tag:
    - name: "php"
      url: "https://www.zone.lv/help/kb-tags/php-eng/"
    - name: "php version"
      url: "https://www.zone.lv/help/kb-tags/php-version/"
---

# How to change PHP version on the web server

Changing the PHP version on the server takes 3 minutes. During this time, any changes made will not be visible on the page.
Since the web browser keeps the connection to the web server open for a certain period of time, the PHP process with the previous PHP version is also in use for that long. It is recommended to close and reopen the web page to start a new PHP process on the server with the already changed PHP version.

## How to change the PHP version for the main domain

To change the PHP version on your server, open `Webhosting` from the top menu, and then, under the `Webserver` section on the left menu, select `Main domain settings`. On the opened page, find the `modify` button.

[![](https://www.zone.lv/static/sites/5/php-muut-eng-01-1024x602.png)](https://www.zone.lv/static/sites/5/php-muut-eng-01.png)

At the bottom of the page, there is a dropdown menu through which you can choose between different PHP versions. Next, select the desired version and click the `Save changes` button to apply the selection.

![change php version on virtual server](https://www.zone.lv/static/sites/5/phpversion-ENG.jpg)

## How to change the PHP version for a subdomain

To change the PHP version for a subdomain, go to `Webhosting`, then select `Webserver` from the left menu. Then click on `Subdomains`. On the opened page, find the subdomain for which you want to change the PHP version and press the `modify` button.

[![](https://www.zone.lv/static/sites/5/php-muut-eng-03-1024x833.png)](https://www.zone.lv/static/sites/5/php-muut-eng-03.png)

At the bottom of the page, there is a dropdown menu where you can choose between different PHP versions. Select the desired version and save by pressing the `Save changes` button.

[![](https://www.zone.lv/static/sites/5/php-muut-eng-04-1024x764.png)](https://www.zone.lv/static/sites/5/php-muut-eng-04.png)

## Testing the PHP version in a browser

The functionality of the application with different PHP versions can be tested in your browser. Testing is possible both on the main domain and on various subdomains. To do this, locate the button `Test PHP versions in Your browser`. You can find it on the main domain settings page as well as on the subdomains page.

[![](https://www.zone.lv/static/sites/5/php-test-eng-01-1024x622.png)](https://www.zone.lv/static/sites/5/php-test-eng-01.png)

[![](https://www.zone.lv/static/sites/5/php-test-eng-02-1024x656.png)](https://www.zone.lv/static/sites/5/php-test-eng-02.png)

Through this button, a test page opens, featuring a selection of various PHP versions in its header. By choosing a version from the drop-down menu, the page in the browser is displayed as it would appear if the PHP on the web server were changed to the selected version. This way, you can determine which versions the page is compatible with and which ones it is not. The testing process does not affect the normal operation of the website.

[![](https://www.zone.lv/static/sites/5/php-muut-testimine02-1-1024x226.png)](https://www.zone.lv/static/sites/5/php-muut-testimine02-1.png)
