/home/website-name-xyz/* is deleted, but some entries stay behind.
The undesired side effect is, you can’t restore a website as you run into an error such as “5009” ( This website already exists… Not able to create Account, Databases and DNS Records, aborting. )
If cyberpanel database is partially corrupt, it can lead to this behavior (message “website successfully deleted”, but not actually fully deleted. Perhaps the admin can put together a quick guide how to remove / cleanup the website remains manually in such cases? ex.
Delete /home/domain-to-delete.com/*
Delete /var/lib/mysql/domai_db1, domai_db2, etc.
Access phpMyAdmin with root password, open cyberpanel database and in various tables, delete all references to domain-to-delete.com and domai (DB username prefix) in specific order as the tables are linked.
Obviously, with a BIG warning that such actions can corrupt the entire cyberpanel and require a fresh server installation, and to BACKUP beforehand.
Or better yet, create a cli bash script to do it for you.
What is the proper process to delete as Delete Website does not work
It leaves all the following directories, using example.com
/home/example.com
/etc/opendkim/keys/example.com
It also leaves all configuration data in the following files:
/etc/passwd
/etc/shadow
/etc/gshadow
/etc/subgid
/etc/dovecot/dovecot.conf
/etc/opendkim/KeyTable
/etc/opendkim/SigningTable
/etc/opendkim/TrustedHosts
/etc/opendkim/keys/mail.example.com/*
/etc/postfix/vmail_ssl.map
It also leaves all configuration data in the cyberpanel database in the following tables:
e_forwardings
loginSystem_administrator