h1

Manually delete records for any domain from plesk psa database

September 27, 2008

Manually delete records for any domain from psa database ( this is plesk windows with psa in mysql database, but should work on msaccess db too )

cd %plesk_dir%\mysql\bin && mysql.exe -u admin -P8306 psa -p

PASSWORD

use psa \G

delete from db_users where db_id=(SELECT id FROM data_bases where dom_id=(SELECT id FROM domains where name=’example.com’));
delete from data_bases where dom_id=(SELECT id FROM domains where name=’example.com’);
delete from mail where id=(SELECT id FROM domains where name=’example.com’);
delete from subdomains where id=(SELECT id FROM domains where name=’example.com’);
delete from dns_recs where id=(SELECT id FROM domains where name=’example.com’);
delete from domains where id=(SELECT id FROM domains where name=’example.com’);
delete from hosting where dom_id=(SELECT id FROM sys_users where home=’C:/inetpub/vhosts//example.com’);
delete from FROM sys_users where home=’C:/inetpub/vhosts//example.com’;
delete from dns_zone where displayName=’example.com’;

exit;

iisweb /delete “example.com”
echo y | del “C:\Inetpub/vhosts\example.com”
echo y | del “C:\Program Files\SWsoft\Plesk\Mail Servers\Mail Enable\Postoffices\example.com”
echo y | del “C:\Program Files\SWsoft\Plesk\Mail Servers\Mail Enable\config\Postoffices\example.com”

“C:\Program Files\SWsoft\Plesk\admin\bin\domain.exe” -r example.com
“C:\Program Files\SWsoft\Plesk\admin\bin\DNSMng.exe” restart

Besides you might need to delete post office manually from mailenable.msc -> postoffices and a few other things in GUI

One comment

  1. This post saved my life!



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: