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

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

