Plesk Utility

The plesk command line utility is used to wrap other Plesk command line utilities. Additionally, it provides administrators and developers convenient way to access Plesk database, configuration files, and log files and allows performing other important tasks such as running daily maintenance script and the Plesk installer.

Usage
plesk [command]
Example

The following command creates the additional Administrator account with the contact name John Doe, Plesk login name JDoe, password sample, and account's email address JDoe@example.com.

plesk bin admin_alias --create JDoe -passwd sample -contact "John Doe" -email JDoe@example.com

Commands
Command Parameter Description Example

bin

UTILITY

Runs the specified Plesk command line utility (e.g., customer, database).

This is applicable to public CLI utilities located at the /usr/local/psa/bin directory.

To create the account with the login name JDoe, password sample, and the account's email address JDoe@example.com:

plesk bin admin_alias --create JDoe -passwd sample -email JDoe@example.com

or

plesk bin admin_alias -c JDoe -passwd sample -email JDoe@example.com

conf

CONFNAME

Open the specified Plesk configuration file in the editor. The available configuration files are: panel.ini (Plesk internal settings), php.ini (PHP interpreter settings, for Plesk with web interface only).

To open panel.ini file in the editor:

plesk conf panel.ini

daily

[TASK_NAME]

Run daily maintenance script.

The following scripts are available:

  • CheckForUpdates
  • InstallUpdates
  • UpdateKeys
  • PleskUsage
  • Sitebuilder
  • MailUsage
  • ExecuteStatistics
  • ProcessAutoreports
  • OptimizeStatistics
  • AnalyseDomainStatistics
  • AnalyseClientStatistics
  • ExecuteSpamtrain
  • LoadCustomizations
  • UpdateApsCache
  • UpdateApsApplications
  • ExecuteGlCleaner
  • StoreProtectedConfigs
  • Filesharing
  • UpgradePanel
  • ExecuteWebStatistics
  • UpdateModSecurityRuleSet
  • AutoresponderEndDate
  • UpdatePhpCurlCertificates
  • ExecuteQuotacheck
  • BackupRestoreStats
  • UpgradeExtensions
  • ComposerSelfUpdate

To run daily check for updates:

plesk daily CheckForUpdates

db

[COMMAND | SQL]

Execute database specific command.

Open MySQL console if no particular command was specified.

Run an SQL query if it is provided instead of a command

Additional commands:

  • tables - Show the list of existing database tables
  • dump [databases] - Show a dump of the specified Plesk database(s) (the psa database dump is shown by default)
  • desc <table> - Show a structure of the specified database table
  • show <table> - Show content of the specified database table

 

To display the list of existing database tables:

 

plesk db tables

installer

[SHORTCUT | OPTIONS]

Run Plesk installer with given options or a predefined set of options via a shortcut.

 

Available shortcuts:

  • install-all-updates - Install all available updates within current Plesk version, including updates for system components such as MySQL or PHP.
  • install-panel-updates - Install only Plesk updates. Reinstall patch if the latest update is already installed. System components such asMySQL and PHP will not be updated unless it is required for proper Plesk functioning.

To install all available updates within current Plesk version:

plesk installer install-all-updates

log

LOGNAME

Display the specified Plesk log file using the "tail -f" utility.

Available log files:

  • error_log - Plesk errors
  • access_log - Web server access log
  • panel.log - Plesk events log
  • maillog - Mail server log file
  • --all - Monitor all available log files

 

Display Plesk error log:

plesk log error_log

php

FILENAME.php

Run a PHP script using the Plesk PHP interpreter.

To run the script.php script from the tmp directory:

plesk php /tmp/script.php

repair

ASPECT [OPTION]

Run Plesk check and repair tool.

Provide aspect 'all' to check and repair all aspects in the interactive mode.

Available aspects: all, mail, web, dns, ftp, db, mysql, fs, installation.

Available options:

-y - Try to repair all found issues.

-n - Do not repair anything, check only.

-v - Display more detailed output (verbose mode).

For details, refer to Plesk Repair Tool.

To reconfigure the mail settings for all mailboxes belonging to the example.com domain, as well as domain-wide mail settings:

plesk repair mail example.com

sbin

UTILITY

Run the specified Plesk internal utility.

This is applicable to the utilities located at /usr/local/psa/admin/sbin directory.

To enable nginx proxy server:

plesk sbin nginxmng -e

 

 

version

 

Show product version information. Version, build date, revision and architecture will be shown.

To view Plesk version information:

plesk version

help

[COMMAND]

Show help and exit. If a command name is specified, the help for a particular command is displayed. If no parameters are used, the plesk utility help is displayed.

To view the help for the repair command:

 

plesk help repair

 

 

Leave your comments on this page

Leave your feedback or question on this documentation topic below. For technical assistance, contact your hosting service provider or submit a request to Plesk support. Suggest new features for Plesk here. Discuss general questions on the Plesk forum. All offtopic comments will be removed.