Diadem Technologies Support Knowledgebase

Important Plesk CLI Commands

Article ID: 1406
Last updated: 13 Jul, 2021

Important Plesk Linux CLI Commands

If Plesk throws an error, these logs will help.

/usr/local/psa/var/log

/opt/psa/admin/logs

/var/log/sw-cp-server/error_log

/usr/local/psa/admin/logs/panel.log

/usr/local/psa/admin/logs/httpsd_access_log

/var/log/psa-horde/psa-horde.log

/usr/local/psa/var/modules/watchdog/log/monit.log

/usr/local/psa/var/log/xferlog

Basic Server commands 

Check disk space: df -Th

Check Ram usages: free -m 

Load,Process & CPU: top -cH or htop

Check Plesk version

cat /usr/local/psa/version

Start and stop Plesk

Stop: service psa stop

Start: service psa start

Restart: service psa restart

Plesk Update: Autoinstaller

/usr/local/psa/admin/sbin/autoinstaller

Perform upgrade

/usr/local/psa/admin/sbin/autoinstaller --select-release-current --upgrade-installed-components

Disk usage by folder

du -sh

Version and micro-updates file

If there are version problems with the update, check the version in this file.

/root/.autoinstaller/microupdates.xml

MySQL Shell

Plesk db

More commands

mysqladmin -uadmin -p`cat /etc/psa/.psa.shadow` processlist

mysqladmin -uadmin -p`cat /etc/psa/.psa.shadow` extended-status | grep Max_used_connections

mysqladmin -uadmin -p`cat /etc/psa/.psa.shadow ` variables | grep 'max.*connections'

List email accounts and passwords

/usr/local/psa/admin/sbin/mail_auth_view | grep <emailid or domain>

Email ID password reset

/usr/local/psa/bin/mail -u <email ID> -passwd <pwd>

Email ID create

plesk bin mail --create [email protected] -passwd Chak@2018 -mailbox true

Check and clear Mail queue 

mailq

To check queue mail header

postcat -q 8B23CA61314 | less

Clear Mail queue

postsuper -d ALL deferred

Clear a specific mail from queue

postsuper -d 86D6382533

Install plesk license through CLI.

plesk bin license -i A00200-K9KG07-AM3649-Y95556-VRGA90

Recalculate statistics for a particular domain in Plesk

plesk sbin statistics --calculate-one --domain-name=example.com

Restart DNS service

/usr/local/psa/admin/bin/dnsmng  --restart 

All services check

plesk bin service -l -include dns,pop3,web,authdaemon,smtp -detail

Reset Admin password 

plesk bin admin --set-admin-password -passwd "P7J6X2*j%s"

Rewrite web server configuration

If you have problems with a website/domain, this command can work wonders.

/usr/local/psa/admin/bin/httpdmng --reconfigure-all

Reconfigure/repair e-mail accounts

If a mailbox is corrupted, run this command to repair it.

/usr/local/psa/admin/sbin/mchk --with-spam

Plesk global php.ini

/usr/local/psa/admin/conf/php.ini

Deactivate single sign-on

/usr/local/psa/bin/sso --disable

This article was:  
Report an issue
Article ID: 1406
Last updated: 13 Jul, 2021
Revision: 5
Views: 858
Comments: 0
Tags