How to remove parked domain through command line – cpanel/WHM

Using cPanel we can simply remove a parked domain via control panel options. Today in this post I will explain how to remove a parked domain via command line.

Step 1: SSH to your server as root user.

ssh root@IPaddress

Step 2: First of all find out all details about the account from ‘/var/cpanel/users’. In this file you can easily get all of the information including ownership.

grep $username /var/cpanel/users

Step 3: Remove the domain entry from /etc/named.conf and the cooresponding .db file /var/named and restart your bind server.

Step 4: Remove the virtual host or ServerAlias from the /etc/httpd/conf/httpd.conf file and restart Apache

Step 5: Remove files with that domain name as the filename from /etc/valiases, /etc/vdomainaliases, and /etc/vfilters.

Step 6: If the domain is in /etc/localdomains or /etc/remotedomains then remove it from those files as well. Do the same for /etc/userdomains.

That’s all we have to do. You also like to know how to Change CPanel/WHM Port Using Command Line Please have  a look and give your opinion below if you experience any issues or to discuss your ideas and experiences.

Leave a Reply

Register to Get FREE Offers

Why Pay for Software when you can GET it for FREE

JOIN US TONIGHT!