HowTo: Remove domain Manually from Plesk

While deleting one domain from Plesk it was throwing following error

Error: Connection to the database server has failed because of network problems:

could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket “/tmp/.s.PGSQL.5432”?

When we checked the domain on server (from shell) we have found that all physical Address (/var/www/vhost/ of the domain has been deleted but still Plesk shows the domain.

Following are the steps to remove the domain from Plesk manually.

1) Connect the server using SSH

2) Login into MySQL Prompt as Plesk admin

[root@server ~]# mysql -uadmin -p`cat /etc/psa/.psa.shadow` -Dpsa

3) Delete the DNS Zone of the domain

mysql> delete from dns_zone where name=’’;
Query OK, 1 row affected (0.09 sec)

mysql> delete from dns_recs where host=’’;
Query OK, 8 rows affected (0.03 sec)

You can verify if any records still persists using following commands

mysql> select * from dns_zone where name=’’;
Empty set (0.00 sec)

mysql> select * from dns_recs where host=’’;
Empty set (0.00 sec)

Now delete the Domain from Domains table which will remove it from Plesk Domains List

mysql> delete from domains where name=’’;
Query OK, 1 row affected (0.06 sec)

Verify it using select Command.

mysql> select * from domains where name=’’;
Empty set (0.00 sec)


NOTE: PLEASE Make Sure To Verify The DOMAIN NAME before you make any changes as it might delete some other domain. Also the changes made are irreversible.

About: Mike

Milind Koyande loves to work on new technologies specially virtualization and troubleshoot server problems. I’m an avid photographer and love to spend my free time close to nature, trying to capture its glory on my camera.

This site uses Akismet to reduce spam. Learn how your comment data is processed.