Managing PHP and Node runtimes
Switch PHP versions safely, run a Node app behind the proxy, and fix common runtime errors.
PHP versions
Different sites may need different PHP versions. The panel lets you set the version per site.
Before switching versions:
Back up the site (files and database).
Check your theme/plugins for compatibility — most modern software supports PHP 8.1+.
Switch on a staging copy first if you have one.
Switch, then immediately load the site and check the error log.
Common breakages after a major PHP bump: removed functions, stricter type warnings, and old extensions. The error log names the file and line — start there.
PHP settings worth knowing
memory_limit — raise it if a script dies with "allowed memory size exhausted".
max_execution_time — raise it for long imports or exports.
upload_max_filesize / post_max_size — raise both, together, for large uploads.
OPcache — leave it on; it is a straight performance win.
Change these per site rather than globally so one heavy app does not loosen limits for everyone.
Node.js apps
For a persistent Node process:
Set the site runtime to Node.
Give the panel a start command (e.g.
node server.jsornpm start) and the port your app listens on.We run it under a process manager and proxy requests to it.
Key points:
Bind to the port we give you (often via
process.env.PORT), not a hard-coded one, and add that port to the proxy.Never bind to port 80/443 yourself — the proxy owns those.
Environment variables (database URLs, API keys) go in the panel's env settings, not in committed files.
Builds run once at deploy; keep build tooling in
devDependenciesand production deps slim.
Common runtime errors
| Symptom | Likely cause |
|---|---|
| 502 Bad Gateway | App crashed or not listening on the expected port |
| 500 with empty body | Unhandled exception at boot — check the app log |
| Works locally, not here | Environment variables missing, or a hard-coded port/path |
| Slow first request | Cold start or a build running on first hit — use a warm start |
| "Port already in use" | A previous process is still bound; restart the app from the panel |
Related reading