• Article for your preferred language does not exist. Below is international version of the article.

Article ID: 5822, created on Dec 3, 2008, last review on May 9, 2014

  • Applies to:
  • Pro Control Panel Linux

Resolution

Sometimes, depending from different faktors the site is not fully removed from the server so it should be deleted manually. Here are all steps that should be done, but please note that after deleting the site can not be restored back.

Everything should be done from under root user.


Check which siteX the site corresponds to:
sitelookup -d domain.com site_handle

and what adminX is responsible for it:
sitelookup -d domain.com wp_user

Let's say siteX is site handler for the necessary domain, and adminX is the owner.

Remove user content physically from the server:
rm -rf /home/virtual/siteX
rm -f /home/virtual/adminX
rm -f /home/virtual/domain.com
rm -f /etc/httpd/conf/virtual/siteX
rm -rf /etc/httpd/conf/siteX
rm -f /etc/webalizer/domain.com
userdel adminX


And remove the records from the system database:

psql appldb

Welcome to psql, the PostgreSQL interactive terminal.
Type: copyright for distribution terms h for help with SQL commands
? for help on internal slash commands g or terminate with semicolon to execute query
q to quit
appldb=>


delete from telnet where site_id = siteX;
delete from apache where site_id =site X;
delete from ssh where site_id = siteX;
delete from users where site_id = siteX;
delete from bandwidth_log where site_id = siteX;
delete from bandwidth_spans where site_id = siteX;
delete from bandwidth where site_id = siteX;
delete from free_uids where site_id = siteX;
delete from diskquota where site_id = siteX;
delete from ipinfo where site_id = siteX;
delete from ipinfo_ipaddrs where site_id = siteX;
delete from ipinfo_nbaddrs where site_id = siteX;
delete from reseller where site_id = siteX;
delete from siteinfo where site_id = siteX;



Finally, you need to go through all the files in /etc/virtualhosting/mappings and check if any of them refer to the site you're deleting. You can use grep to quickly see if/which files might refer to the site to be deleted:

cd /etc/virtualhosting/mappings
grep -l siteX *




And finally - restart ensim CP:
/etc/init.d/epld stop
/etc/init.d/epld start



3ccb419cf98083f3bb45808fba8dbc7c 4cc899da08664637a8bc437308d3ddd7 6311ae17c1ee52b36e68aaf4ad066387

Email subscription for changes to this article
Save as PDF