↑ ↓ select, Enter open, Esc close

Change the PHP version of a domain from the command line

Caution: This command changes the system. Understand what it does before you run it.

Adjust the values, the command updates live
root@server
plesk bin domain --update example.com -php_handler_id plesk-php83-fpm

Switches the PHP version and execution mode of a domain to the given handler. Valid IDs are listed by plesk bin php_handler --list. Useful for bulk changes when old PHP versions reach end of life.

Note: Check first whether the application is compatible with the new PHP version. To roll back, run the same command with the old handler ID.

Open question before approval: Prüfen, ob -php_handler_id bei plesk bin domain --update greift oder ob für Abonnements plesk bin subscription --update nötig ist.

Also searched as

  • plesk command line change php version
  • switch domain to php 8.3 plesk
  • change php handler of a domain

Related one-liners

All in Plesk

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.