• Welcome to DNForum.com - Domain Investor Forum, Free Domain Marketplace and a community for 45+ domain pros
    If you are new to domains and looking to buy, sell and learn about domains then you have come to the right place. DNForum is the oldest global domain name community on the internet and continues to grow every day. There are over 45,000 domainers on DNForum doing everything from buying domains, selling domains, using our free in-house built tools, learning about domains and discussing domains. Take a minute and Register.

Adding Domains to CPanel in Bulk?

Status
Not open for further replies.

GT Web

DNF Addict
The Originals
Legacy Exclusive Member
Joined
Feb 21, 2003
Messages
6,459
Reaction score
3
Hello all,

Looking for some help with this one...I may need to add approximately 500 domains to a hosting account with CPanel for a client I am working for and then subsequently upload a website for each domain.

This will be a painful and time-consuming process I realize, but are there any shortcuts you know to speed this up? I was thinking there has to be some sort of script made for CPanel that could help me here...

Thanks in advance!
 
If you would like to have files placed in an account upon creation through cpanel place files in /cpanel3-skel/public_html
Whatever is in the directory when creating an account will be in the new accounts directory.
Sorry as I have no info on how to add 500 domains at once :)
 
Are they running their own dedicated server (where you have root access) or using a virtual hosting account?
 
jdk, Is that you asking over at WHT the same thing?
 
Yes, I am trying to ask around for him. I know there is such a script to do email's but not addon's. If I find something I will send it his way. I have also asked on cPanel.net's forum too.
 
Thanks jdk - your help is much appreciated.

I believe we will be running a dedicated server, but this is not confirmed yet. As I said, I am not 100% sure I will need to do this yet, so dont spend too much time on it. I am asking now in the hopes I will figure out a solution before the problem is officially handed to me.

Thanks again!
 
No problem. I posted two threads on other forums to find an answer. If I get a reply it will email me. I will be needing a similar script so if you get an answer be sure to post it here or send a PM my way.
 
I myself would like to see a similar script. If I have to write one I will but I will wait to see what pops up.
 
Do you know how to add just one addon domain? If so I should be able to modify it to add multiple addons.
 
I will look into the cpanel API docs for this.
 
Nice to see fellow members helping eachother out..

Not knowing anything about cpanel he's what I would do...

make a text file with all of the domains;

use a php file like this (this might have to be added into the cpanel directory, but maybe not:
Code:
<?php
$file = file("domains.txt");
if($linenumber==""){
$linenumber=0;
}
$domain = $file[$linenumber];
if($domain==""){
echo "script is complete";
die;
}
$file = file("http://urlforcpaneladdon?variableforaddondomain=$domain&variableforaddonpassword=chooseapassword&variablefordirectory=$domain");
foreach($file as $line){
echo $line;
}
$newlinenumber=$linenumber+1;
echo <<<END
<meta http-equiv="refresh" content="2;url=thisscriptname.php?linenumber=$newlinenumber">
END;
?>

good luck; this is just a rough framework (I could have made mistakes :p)
 
Thanks Jordan, hopefully this will help many DNF members work with CPanel more efficiently :-)
 
Status
Not open for further replies.
Back
Top Bottom