PHP version and related settings
Each hosting runs in an environment built from a specific PHP image. You can change the PHP version for the whole hosting, restart PHP, clear OPcache, and – where your plan allows it – set a different PHP version for a single directory or subdomain, all from the hosting's page in the panel.
Changing the PHP version for the whole hosting
Open https://panel.cloudweb.sk, pick the hosting, and go to its Advanced tab. In the "PHP version" section you'll see the current version and a dropdown listing the versions your plan allows.
- Pick the target PHP version from the dropdown.
- Click the switch button.
- Confirm in the dialog.
The hosting switches to the new version by being reconfigured in the background, the same mechanism used for other configuration changes. Files, databases, e-mail and DNS records are untouched; the site can be briefly unreachable for a few seconds while the hosting restarts.
This section only appears if your plan includes at least one PHP image – the static "Vizitka" (business-card website) plan has no PHP image and never shows it.
Available versions
The currently active PHP versions are 8.1, 8.2, 8.3 and 8.4, each available as an Nginx + PHP-FPM build and an Apache build. New hostings default to the Nginx + PHP-FPM build. The line-up can change over time; the dropdown in the panel always shows the current list, limited to what your plan allows.
Restarting PHP and clearing OPcache
The same tab has two quick actions:
- Restart PHP – restarts the PHP-FPM process on your hosting. In-flight requests are interrupted for a few seconds.
- Clear OPcache – forces PHP files to be reloaded without interrupting in-flight requests (a graceful reload). Use this after deploying new code if you don't see the change immediately. If the graceful reload fails, the system falls back to a full PHP-FPM restart.
Both actions act on the PHP-FPM process running on your hosting.
A different PHP version for one directory or subdomain
You can run a sub-folder of the site (for example /legacy, see changing the document root), or a subdomain created in the folder-based subdomain mode, on a different PHP version than the rest of the hosting. This lives on the Domains tab, under the Subdomains sub-tab, in the "PHP version per directory" section.
This is a plan-level feature and is not enabled by default on any plan. If you need it, contact support – they can turn it on for your plan and set how many such exceptions you're allowed.
Once enabled, adding an exception works like this:
- Pick the type – Directory (a path relative to the document root, e.g.
legacy) or Subdomain (a subdomain name). - Pick the target PHP version – only active versions other than the hosting's own version are offered.
- Click Add and reprovision.
Each added version runs as its own php-fpm process next to the hosting's main process and shares its files. Adding or removing an exception reconfigures the hosting in the background, which restarts the web server for a few seconds. A subdomain target only works in the folder-based (or mixed) subdomain mode – it can't be picked otherwise.
Was this article helpful?
Your feedback helps us improve our documentation