Important Plesk CLI Commands

Important Plesk CLI Commands

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 example@example.in -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


    • Related Articles

    • Enable Google Authenticator with Plesk

      Enable Google Authenticator with Plesk Objective: This extension offers additional user account protection with multi-factor authentication. After enabling Google Authenticator, a second step is added to the Plesk login procedure: in addition to ...
    • Plesk compatibility mode for legacy option

      Plesk compatibility mode for legacy option (Separate SSL/TLS and non-SSL/TLS content) Problem: Opening the website with https shows a default placeholder page as given below: “This is the placeholder for domain <domain name>. If you see this page ...
    • Plesk Custom File Extension Support

      Plesk Custom File Extension Support Issue: Problem with the ".htaccess" file and the "include" function, resulting in the top panel and footer not appearing on the website as the include files are not processed in the web server Step 1: Navigate to ...
    • Plesk services logs and configuration files

      Plesk services logs and configuration files Plesk Logs Error log: /var/log/sw-cp-server/error_log Access log: /var/log/plesk/httpsd_access_log Panel log: /var/log/plesk/panel.log Configuration PHP config on RHEL-based: ...
    • Plesk Website Logs Access and Downoad

      View Website Logs from Plesk - Download and Step 1: Accessing log reports and download from plesk panel 1. Visit the URL http://<your_domain>:8880 or https://<your_domain>:8443 (For SSL) and login. 2. Go to the Websites & Domains and click on Logs ...