↑ ↓ select, Enter open, Esc close

List all installed Plesk PHP versions

user@server
for p in /opt/plesk/php/*/bin/php; do echo "$p: $($p -r 'echo PHP_VERSION;')"; done

Loops over all PHP installations under /opt/plesk/php and prints path and exact version. Plesk installs its own PHP versions there, independent of Debian’s PHP. Useful for finding the right interpreter for cron jobs or Composer.

Note: Which version a subscription uses is shown in Plesk under the PHP settings of the domain.

Open question before approval: Prüfen, ob zusätzlich plesk bin php_handler --list als Variante im Hinweis genannt werden soll und auf Obsidian die erwartete Ausgabe liefert.

Also searched as

  • which php versions does plesk have
  • plesk php binary path
  • php versions installed on server

Related one-liners

All in PHP

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.