Plesk Documentation


Plesk is a control panel commonly used for shared hosting platforms.

Plesk CLI

The Plesk CLI is a set of command-line tools which can be used to manage Plesk without using the web interface. It is much more in-depth than what I shall cover here, however I have included a small number of useful tools from the CLI below which are useful when investigating and resolving issues with Plesk servers.

Accessing Plesk web-interface using CLI

These are the two commands you will likely need if you don't have the admin password for Plesk. The first command is for Plesk versions up to 12.5 and will give you the admin password. The second command is for Plesk 17 and up, and will give you a one-time login link.

Prior to Onyx
/usr/local/psa/bin/admin --show-password
Onyx and Later
plesk login

Accessing MySQL using CLI

If you don't have the admin MySQL password, then depending on your version of Plesk, you can retrieve / access MySQL using the CLI. This is only possible via the Plesk CLI on Onyx, but previous versions of Plesk also have a method of accessing MySQL which I have also documented here.

Prior to Onyx
mysql -uadmin -p`cat /etc/psa/.psa.shadow`
Onyx and Later
plesk db

Dumping databases using CLI

The Plesk db CLI also has the facility to dump databases to file. It is somewhat more straight forward than using the mysqldump command and have to cat the shadow file out which is why I have included it here. As is the case with large parts of the Plesk CLI, I am unsure as to when this was introduced and so I have also included the old method.

Prior to Onyx
mysqldump -uadmin -p`cat /etc/psa.psa.shadow` [database_name]
Onyx and Later
plesk db dump [database_name]

Passive FTP

Typically when using NATing within your solution, you will need to configure passive FTP differently to ensure it functions correctly.This guide explains the process. The guide also assumes you are running ProFTPd.

Step 1

Edit the `/etc/proftpd.conf` file and locate the `Global` section. Within the global section, you will need to explicitly set the passive FTP ports like the following:

    PassivePorts 40000 40100

Step 2

Restart the FTP service using the following command. The specific command you will run repends on your Operating System. If you are unsure as to which to use, then default to the CentOS 6 example.

CentOS 6
service xinetd restart
CentOS 7
systemctl restart xinetd

Step 3

Ensure that the passive ports you have configured on your firewall. If you have a hardware firewall / security groups then you will likely need to configure these within your hosting provider's control panel. If you are using a software firewall such as `iptables` then the following command may be useful.

iptables -A INPUT -p tcp --match multiport --dports 40000:40100 -j ACCEPT

If you continue to have issues with this issue, then I would suggest contacting your hosting provider to ensure that it is configured correctly.