zubrag.com
Free php and cpanel scripts to automate your daily routine

Free PHP Scripts :: Delete cPanel Subdomain

Designed to delete cPanel subdomains on cPanel hosting.

Input:
  • cPanel account username
  • cPanel account password
  • cPanel skin (see How to determine cPanel skin for more info on how to find out your cPanel skin name)
  • list of subdomains to be deleted in the plain text file (for bunch subdomains delete)

Update program header with above settings and script is ready to use.

Usage: (you can use this script in either way)
  • Open script in browser and fill the form data
  • Pass all information via URL (form will not appear in this case)
    Example: subdel.php?cpaneluser=USER&cpanelpass=PASSWORD&domain=DOMAIN&subdomain=SUBDOMAIN
  • List all subdomains to be deleted in the plain text file

Note: If script cannot find file with subdomains and no parameters passed via URL then it will show input form.

Download Delete cPanel Subdomain


Comments

info [anti-spam] galway.ws September 22, 2007
Hi ,

Only thing I had to change was the following line:

$request = "/frontend/$cpanel_skin/subdomain/dodeldomain.html?domain=".$domain."_".$subd;

to

$request = "/frontend/$cpanel_skin/subdomain/dodeldomain.html?domain=".$subd."_".$domain;

Not sure if this was a version difference or what ..

Great code and a greater coder! Would love to do some work with you sometime.

Cheers
billgeo13 [anti-spam] gmail.com October 12, 2008
The previous commenter was right. I am not sure if this is specific to the cPanel theme i use (i use x3) or the version of Cpanel (11), but the sequence if the subd and domain vars need to be changed for the code to work.
Wapmaster [anti-spam] mailmate.Co.Za November 5, 2008
awek gadis Jom join wap aku masterwap.com
sammundiyani [anti-spam] gmail.com December 30, 2008
Great code. Great work
Cheers
June 20, 2009
bb
June 20, 2009
Very good,
I like your scripts.. they are very usefull
marioruimelo [anti-spam] gmail.com July 1, 2009
it don't workk for me...
i can create subdomains, with the other script but this one doesn't work. the strange thing is that apperas "Subdomain Removal The subdomain aaaa.abcd.net has been successfully removed."
Strange
alih_eng [anti-spam] hotmail.com October 12, 2009
is this code work online by any body has not have the domain and have not password and user name.
thank you
swth_anjali [anti-spam] yahoo.com December 4, 2010
very good
June 21, 2011
This code worked for me with the change
as suggested by the commenter in 10/22/07.

However, how can i get it not to display
all the stuff in the output. I would
like just to see the action that it is working on - and just success or failure.

How would I modify the script to do that ?
A Dude. June 17, 2014
Thanks, this worked perfectly!
ian [anti-spam] prelim.co July 18, 2016
Total newb to php but how do I implement this code into my cpanel account?
shahzeb [anti-spam] ibxtechnologies.com July 18, 2018
Thanks for sharing such a good work but as of July 2018 it is not working any more.

Here is updated and cPanel api v2 supported https://github.com/MianShahzeb/cpanel-bulk-subdomain-removal