The Plesk Command Line Interface (CLI) provides a powerful way to manage your Plesk server.
To generate a URL for logging into Plesk via SSH, use:
plesk login
Note: In Plesk, the root directory is /usr/local/psa/
, and the web directory for a domain is usually /var/www/vhosts/example.com/httpdocs/
, where example.com
is the domain name.
plesk bin poweruser
Power User mode provides access to additional server management features and utilities.
plesk bin service --status-all
plesk bin ipmanage --list
plesk bin domain --list
plesk bin domain -i linux-server-admin.com
plesk bin subscription --list
plesk bin site --list
plesk bin site -i linux-server-admin.com
plesk bin domain_alias --list
plesk bin dns --list linux-server-admin.com
plesk bin database --list
plesk bin database -c example_db -domain linux-server-admin.com -type mysql -server localhost -passwd P@ssw0rd
This command creates a new MySQL database named example_db
for the domain linux-server-admin.com
, with a password of P@ssw0rd
.
plesk bin database --export example_db -domain linux-server-admin.com -type mysql -server localhost -passwd P@ssw0rd --file example_db.sql
This command exports the contents of the example_db
database for the domain linux-server-admin.com
to a file named example_db.sql
.
plesk bin database --import example_db -domain linux-server-admin.com -type mysql -server localhost -passwd P@ssw0rd --file example_db.sql
This command imports the contents of the example_db.sql
file into the example_db
database for the domain linux-server-admin.com
.
plesk bin service --restart <service_name>
Replace <service_name>
with the name of the service you want to restart.
plesk installer update
This command updates Plesk to the latest version.
plesk bin pleskbackup --domains-name linux-server-admin.com --output-file /path/to/backup/file
This command creates a backup of the domain linux-server-admin.com
and saves it to the specified file path.
plesk bin pleskrestore --domains-name linux-server-admin.com --input-file /path/to/backup/file
This command restores the domain linux-server-admin.com
from the specified backup file.